diff --git a/api-console/package-lock.json b/api-console/package-lock.json index 4a66f5e..cd031ce 100644 --- a/api-console/package-lock.json +++ b/api-console/package-lock.json @@ -21,7 +21,7 @@ "eslint-config-prettier": "^8.3.0", "husky": "^6.0.0", "lint-staged": "^10.5.4", - "postcss": "^8.2.13", + "postcss": "^8.2.14", "rimraf": "^3.0.2", "rollup": "^2.47.0", "rollup-plugin-cpy": "^2.0.1", @@ -857,9 +857,9 @@ } }, "node_modules/@api-components/api-endpoint-documentation": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@api-components/api-endpoint-documentation/-/api-endpoint-documentation-6.0.1.tgz", - "integrity": "sha512-u0b1ZFJCyBxSOPJL/D0ZA8cY+779OIFw45cTFPERVGrICwO5n4aljch5ZUMzRrIGMs8BCntmU3FNCUb+tpeZ3Q==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@api-components/api-endpoint-documentation/-/api-endpoint-documentation-6.0.2.tgz", + "integrity": "sha512-vOz7dwOq7qMhpD1H+ROHrI3to2KCHPJE+DEUadfHgiAZgwCozaxwdYB4BSaRR1arBWq2EpmtE59IErSFIvLvZg==", "dependencies": { "@advanced-rest-client/arc-icons": "^3.3.1", "@advanced-rest-client/arc-marked": "^1.0.6", @@ -1015,9 +1015,9 @@ } }, "node_modules/@api-components/api-request": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/@api-components/api-request/-/api-request-0.1.13.tgz", - "integrity": "sha512-NVxAsE9O0HLHd1NxuFDfjX6GSocpiJSwO7nbYv9lwBXNumYqPl3e/si9QkYuxxTeqrGCr4vWAOqX2Dgy+m0OCg==", + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/@api-components/api-request/-/api-request-0.1.15.tgz", + "integrity": "sha512-d/SY2fQcjMogDm5daOV0tBAgb4iCayg32Jvmo5vK2v/279NPle1be9V7ABYwIL3OWdrllR9XzItg0Sp+BWUO1g==", "dependencies": { "@advanced-rest-client/arc-events": "^0.2.13", "@advanced-rest-client/arc-headers": "^0.1.7", @@ -6842,9 +6842,9 @@ "dev": true }, "node_modules/hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true, "peer": true }, @@ -7791,9 +7791,12 @@ } }, "node_modules/jsrsasign": { - "version": "10.1.13", - "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.1.13.tgz", - "integrity": "sha512-EKifn2DocDxU2fWVqTJgFYjZUcL4fTUtfgN5OQP4t4i/WOioios8wq350E1aJFxCLmtdxGNqhLX3O0tdVqJoFg==" + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.2.0.tgz", + "integrity": "sha512-khMrV/10U02DRzmXhjuLQjddUF39GHndaJZ/3YiiKkbyEl1T5M6EQF9nQUq0DFVCHusmd/jl8TWl4mWt+1L5hg==", + "funding": { + "url": "https://github.com/kjur/jsrsasign#donations" + } }, "node_modules/jstransform": { "version": "11.0.3", @@ -9503,9 +9506,9 @@ } }, "node_modules/postcss": { - "version": "8.2.13", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.13.tgz", - "integrity": "sha512-FCE5xLH+hjbzRdpbRb1IMCvPv9yZx2QnDarBEYSN0N0HYk+TcXsEhwdFcFb+SRWOKzKGErhIEbBK2ogyLdTtfQ==", + "version": "8.2.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.14.tgz", + "integrity": "sha512-+jD0ZijcvyCqPQo/m/CW0UcARpdFylq04of+Q7RKX6f/Tu+dvpUI/9Sp81+i6/vJThnOBX09Quw0ZLOVwpzX3w==", "dev": true, "dependencies": { "colorette": "^1.2.2", @@ -15331,9 +15334,9 @@ } }, "@api-components/api-endpoint-documentation": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@api-components/api-endpoint-documentation/-/api-endpoint-documentation-6.0.1.tgz", - "integrity": "sha512-u0b1ZFJCyBxSOPJL/D0ZA8cY+779OIFw45cTFPERVGrICwO5n4aljch5ZUMzRrIGMs8BCntmU3FNCUb+tpeZ3Q==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@api-components/api-endpoint-documentation/-/api-endpoint-documentation-6.0.2.tgz", + "integrity": "sha512-vOz7dwOq7qMhpD1H+ROHrI3to2KCHPJE+DEUadfHgiAZgwCozaxwdYB4BSaRR1arBWq2EpmtE59IErSFIvLvZg==", "requires": { "@advanced-rest-client/arc-icons": "^3.3.1", "@advanced-rest-client/arc-marked": "^1.0.6", @@ -15489,9 +15492,9 @@ } }, "@api-components/api-request": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/@api-components/api-request/-/api-request-0.1.13.tgz", - "integrity": "sha512-NVxAsE9O0HLHd1NxuFDfjX6GSocpiJSwO7nbYv9lwBXNumYqPl3e/si9QkYuxxTeqrGCr4vWAOqX2Dgy+m0OCg==", + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/@api-components/api-request/-/api-request-0.1.15.tgz", + "integrity": "sha512-d/SY2fQcjMogDm5daOV0tBAgb4iCayg32Jvmo5vK2v/279NPle1be9V7ABYwIL3OWdrllR9XzItg0Sp+BWUO1g==", "requires": { "@advanced-rest-client/arc-events": "^0.2.13", "@advanced-rest-client/arc-headers": "^0.1.7", @@ -20596,9 +20599,9 @@ "dev": true }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true, "peer": true }, @@ -21360,9 +21363,9 @@ } }, "jsrsasign": { - "version": "10.1.13", - "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.1.13.tgz", - "integrity": "sha512-EKifn2DocDxU2fWVqTJgFYjZUcL4fTUtfgN5OQP4t4i/WOioios8wq350E1aJFxCLmtdxGNqhLX3O0tdVqJoFg==" + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.2.0.tgz", + "integrity": "sha512-khMrV/10U02DRzmXhjuLQjddUF39GHndaJZ/3YiiKkbyEl1T5M6EQF9nQUq0DFVCHusmd/jl8TWl4mWt+1L5hg==" }, "jstransform": { "version": "11.0.3", @@ -22767,9 +22770,9 @@ "dev": true }, "postcss": { - "version": "8.2.13", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.13.tgz", - "integrity": "sha512-FCE5xLH+hjbzRdpbRb1IMCvPv9yZx2QnDarBEYSN0N0HYk+TcXsEhwdFcFb+SRWOKzKGErhIEbBK2ogyLdTtfQ==", + "version": "8.2.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.14.tgz", + "integrity": "sha512-+jD0ZijcvyCqPQo/m/CW0UcARpdFylq04of+Q7RKX6f/Tu+dvpUI/9Sp81+i6/vJThnOBX09Quw0ZLOVwpzX3w==", "dev": true, "requires": { "colorette": "^1.2.2", diff --git a/api-console/package.json b/api-console/package.json index cb9af56..9c883f2 100644 --- a/api-console/package.json +++ b/api-console/package.json @@ -23,7 +23,7 @@ "eslint-config-prettier": "^8.3.0", "husky": "^6.0.0", "lint-staged": "^10.5.4", - "postcss": "^8.2.13", + "postcss": "^8.2.14", "rimraf": "^3.0.2", "rollup": "^2.47.0", "rollup-plugin-cpy": "^2.0.1", diff --git a/api-console/src/api-console-app.js b/api-console/src/api-console-app.js index 7c67659..824e9d8 100644 --- a/api-console/src/api-console-app.js +++ b/api-console/src/api-console-app.js @@ -15,6 +15,24 @@ class CustomApiConsoleApp extends ApiConsoleApp { .proxy="${this.proxy}" .proxyEncodeUrl="${this.proxyEncodeUrl}">`; } + + resetSelection() { + if (this.page !== 'docs') { + this.page = 'docs'; + } + this.selectedShapeType = 'summary'; + this.selectedShape = 'summary'; + } + + _apiNavigationOcurred(e) { + const { selected, type, passive } = e.detail; + const isPassive = passive === true; + if (!isPassive && this.page !== 'docs') { + this.closeTryIt(); + } + this.selectedShape = selected; + this.selectedShapeType = type; + } } window.customElements.define('api-console-app', CustomApiConsoleApp); \ No newline at end of file diff --git a/extension/CHANGELOG.md b/extension/CHANGELOG.md index be2fc5f..9254f4e 100644 --- a/extension/CHANGELOG.md +++ b/extension/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## 1.2.1 + +### Changes + +* The API file preview shows loading animation. + +* When API file preview is loaded, the `Summary` section will be selected by default when available. + +### Security + +Restrict local servers to listen only on `127.0.0.1`. + +### Fixes + +Fix the Try It functionality for VS Code 1.56. + ## 1.2.0 ### Features diff --git a/extension/assets/api-console/apic-build.js b/extension/assets/api-console/apic-build.js index f1dd160..37beec1 100644 --- a/extension/assets/api-console/apic-build.js +++ b/extension/assets/api-console/apic-build.js @@ -1,4 +1,4 @@ -function e(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}e("/* \r\n TODO: VS Code variables should be used for theming.\r\n https://code.visualstudio.com/api/extension-guides/webview#theming-webview-content\r\n*/\r\nhtml {\r\n --primary-color: #00A2DF;\r\n --accent-color: #4CAF50;\r\n --code-background-color: #f5f2f0;\r\n --error-color: #F44336;\r\n /* --secondary-text-color: #616161; */\r\n /* --primary-background-color: #424242; */\r\n /* --code-background-color: #263238;\r\n --code-color: #fff; */\r\n \r\n --anypoiont-dropdown-shaddow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.4);\r\n --anypoiont-autocomplete-dropdown-shaddow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.4);\r\n \r\n --anypoint-listbox-background-color: #fff;\r\n \r\n --arc-font-body1-font-size: 16px;\r\n --arc-font-body1-font-weight: 400;\r\n --arc-font-body1-line-height: 20px;\r\n --arc-font-code-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;\r\n \r\n --arc-font-headline-font-size: 24px;\r\n --arc-font-headline-font-weight: 400;\r\n --arc-font-headline-letter-spacing: -.012em;\r\n --arc-font-headline-line-height: 32px;\r\n \r\n --arc-font-title-font-size: 20px;\r\n --arc-font-title-font-weight: 500;\r\n --arc-font-title-line-height: 28px;\r\n \r\n --arc-font-subhead-font-size: 16px;\r\n --arc-font-subhead-font-weight: 400;\r\n --arc-font-subhead-line-height: 24px;\r\n \r\n --code-mirror-height: auto;\r\n \r\n --api-navigation-list-item-selected-background-color: #E1F5FE;\r\n --api-navigation-list-item-selected-color: #0277BD;\r\n --api-navigation-operation-font-size: 13px;\r\n /* --api-navigation-color: #000; */\r\n \r\n --http-method-label-get-background-color: rgb(0, 128, 0);\r\n --http-method-label-get-color: #fff;\r\n --http-method-label-post-background-color: #006ec5;\r\n --http-method-label-post-color: #fff;\r\n --http-method-label-put-background-color: #ffa500;\r\n --http-method-label-put-color: #1D0029;\r\n --http-method-label-delete-background-color: #e93628;\r\n --http-method-label-delete-color: #fff;\r\n --http-method-label-patch-background-color: #811f92;\r\n --http-method-label-patch-color: #F2F1EF;\r\n \r\n /* --api-body-document-media-button-background-color: #2196F3; */\r\n }\r\n ");e("html {\r\n --primary-color: #ffcc80;\r\n --primary-text-color: #fff;\r\n --accent-color: #9c27b0;\r\n --secondary-text-color: rgba(255, 255, 255, 0.84);\r\n --primary-background-color: #212121;\r\n --error-color: #ff9090;\r\n --link-color: #8bc34a;\r\n\r\n /* layout */\r\n --api-console-toolbar-background-color: #424242;\r\n --api-console-menu-background-color: var(--primary-background-color);\r\n --api-console-menu-color: #fff;\r\n\r\n --anypoint-checkbox-label-color: #F5F5F5;\r\n --anypoint-input-background-color: #494949;\r\n --anypoint-input-label-color: #fff;\r\n --anypoint-input-input-color: #fff;\r\n --anypoint-input-border-bottom-color: #fff;\r\n --anypoint-input-focused-border-bottom-color: #fff;\r\n --anypoint-input-label-background-color: rgb(66, 66, 66);\r\n --anypoint-input-legacy-focus-background-color: #3a3b3c;\r\n --anypoint-input-legacy-focus-border-color: #178bea;\r\n --anypoint-input-info-message-color: #fff;\r\n\r\n --inline-documentation-background-color: #3a3a3a;\r\n\r\n --anypoint-menu-button-border-radius: 12px;\r\n\r\n --anypoint-dropdown-menu-background-color: #494949;\r\n --anypoint-dropdown-menu-label-background-color: var(--primary-background-color);\r\n --anypoint-listbox-background-color: #494949;\r\n --anypoint-dropdown-menu-focus-background-color: #616161;\r\n --anypoint-dropdown-menu-label-color: #fff;\r\n --anypoint-dropdown-menu-info-message-color: #fff;\r\n --anypoint-item-hover-background-color: #616161;\r\n --anypoint-item-focused-background-color: #212121;\r\n --anypoint-autocomplete-background-color: #494949;\r\n --anypoint-icon-button-emphasis-low-color: #c5c5c5;\r\n\r\n --anypoint-button-emphasis-low-hover-background-color: #616161;\r\n --anypoint-button-emphasis-low-focus-background-color: var(--anypoint-button-emphasis-low-hover-background-color);\r\n --anypoint-button-emphasis-low-focus-color: var(--primary-color);\r\n\r\n --code-mirror-background-color: #1e1e1e;\r\n --code-mirror-gutters-background-color: #1e1e1e;\r\n --code-mirror-string-color: #C3E88D;\r\n --code-mirror-punctuation-color: #EEFFFF;\r\n --code-mirror-atom-color: #F07178;\r\n --code-mirror-number-color: #F78C6A;\r\n --code-mirror-cursor-color: #009688;\r\n --code-mirror-tag-color: #ffffff;\r\n --code-mirror-tag-color: #b4b4b4;\r\n --code-mirror-gutters-border-right-color: #757575;\r\n\r\n --code-operator-value-background-color: transparent;\r\n --code-background-color: #212121;\r\n --code-color: #fff;\r\n --code-type-number-value-color: #eb67b0;\r\n --code-property-value-color: #b0e6ff;\r\n --code-type-text-value-color: #ffb89b;\r\n --code-type-boolean-value-color: #72baff;\r\n --code-type-number-value-color: #b5cea8;\r\n --code-token-comment-value-color: #91afcd;\r\n --code-keyword-value-color: #63d0ff;\r\n\r\n --api-type-document-type-attribute-color: #fff;\r\n --api-annotation-document-color: #fff;\r\n --api-body-document-description-color: #fff;\r\n --api-method-documentation-description-color: #fff;\r\n --api-method-documentation-bottom-navigation-color: #fff;\r\n --api-method-documentation-url-background-color: var(--code-background-color);\r\n --markdown-styles-code-text-shadow: none;\r\n\r\n --http-code-snippet-code-text-shadow: #fff;\r\n --http-code-snippet-container-background-color: var(--code-background-color);\r\n --http-code-snippet-code-function-color: #82AAFF;\r\n --http-code-snippet-code-keyword-color: #C792EA;\r\n --http-code-snippet-code-cdata-color: #adb9c5;\r\n\r\n --api-type-document-property-parent-color: #fff;\r\n\r\n --from-row-action-icon-color: #fff;\r\n --icon-button-color: #fff;\r\n --api-form-action-icon-color: #fff;\r\n --api-form-action-button-color: #fff;\r\n\r\n --auth-method-oauth2-redirect-info-color: #fff;\r\n --inline-documentation-color: #fff;\r\n\r\n --api-endpoint-documentation-bottom-navigation-color: var(--link-color);\r\n --api-endpoint-documentation-description-color: #fff;\r\n --api-method-documentation-bottom-navigation-color: var(--link-color);\r\n\r\n --authorization-method-oauth2-redirect-info-color: #fff;\r\n\r\n --api-navigation-section-title-focus-background-color: rgba(255, 255, 255, 0.12);\r\n --api-navigation-list-item-selected-background-color: rgba(255, 255, 255, 0.3);\r\n --api-navigation-list-item-selected-color: #FFF;\r\n\r\n /* Response error message */\r\n --error-message-icon-color: rgba(255, 255, 255, 0.64);\r\n --error-message-color: #fff;\r\n --error-message-code-color: #9e9e9e;\r\n\r\n /* HTTP method colors */\r\n --http-get-color: rgba(0, 128, 0, 0.74);\r\n --http-post-color: rgba(33, 150, 243, 0.74);\r\n --http-put-color: rgba(255, 165, 0, 0.74);\r\n --http-patch-color: rgb(156, 39, 176);\r\n --http-delete-color: rgba(244, 67, 54, 0.74);\r\n --http-options-color: rgba(128, 128, 128, 0.74);\r\n --http-head-color: rgba(128, 128, 128, 0.74);\r\n --http-connect-color: rgba(128, 128, 128, 0.74);\r\n --http-trace-color: rgba(128, 128, 128, 0.74);\r\n --http-method-label-get-background-color: var(--http-get-color);\r\n --http-method-label-get-color: #fff;\r\n --http-method-label-post-background-color: var(--http-post-color);\r\n --http-method-label-post-color: #fff;\r\n --http-method-label-patch-background-color: var(--http-patch-color);\r\n --http-method-label-patch-color: #fff;\r\n --http-method-label-put-background-color: var(--http-put-color);\r\n --http-method-label-put-color: #fff;\r\n --http-method-label-delete-background-color: var(--http-delete-color);\r\n --http-method-label-delete-color: #fff;\r\n --http-method-label-options-background-color: var(--http-options-color);\r\n --http-method-label-options-background-color: #fff;\r\n --http-method-label-head-background-color: var(--http-head-color);\r\n --http-method-label-head-background-color: #fff;\r\n --http-method-label-trace-background-color: var(--http-trace-color);\r\n --http-method-label-trace-background-color: #fff;\r\n --http-method-label-connect-background-color: var(--http-connect-color);\r\n --http-method-label-connect-background-color: #fff;\r\n}\r\n\r\nbody {\r\n background-color: #212121;\r\n color: #fff;\r\n\r\n margin: 0;\r\n padding: 0;\r\n font-family: 'Roboto', 'Noto', sans-serif;\r\n font-size: 15px;\r\n height: 100%;\r\n}\r\n\r\napi-selector {\r\n background-color: #111111;\r\n color: #fff;\r\n}\r\n");const t="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,i=(e,t,i=null,s=null)=>{for(;t!==i;){const i=t.nextSibling;e.insertBefore(t,s),t=i}},s=(e,t,i=null)=>{for(;t!==i;){const i=t.nextSibling;e.removeChild(t),t=i}},n=`{{lit-${String(Math.random()).slice(2)}}}`,a=`\x3c!--${n}--\x3e`,r=new RegExp(`${n}|${a}`);class o{constructor(e,t){this.parts=[],this.element=t;const i=[],s=[],a=document.createTreeWalker(t.content,133,null,!1);let o=0,c=-1,p=0;const{strings:u,values:{length:m}}=e;for(;p0;){const t=u[p],i=d.exec(t)[2],s=i.toLowerCase()+"$lit$",n=e.getAttribute(s);e.removeAttribute(s);const a=n.split(r);this.parts.push({type:"attribute",index:c,name:i,strings:a}),p+=a.length-1}}"TEMPLATE"===e.tagName&&(s.push(e),a.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(n)>=0){const s=e.parentNode,n=t.split(r),a=n.length-1;for(let t=0;t{const i=e.length-t.length;return i>=0&&e.slice(i)===t},c=e=>-1!==e.index,h=()=>document.createComment(""),d=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function p(e,t){const{element:{content:i},parts:s}=e,n=document.createTreeWalker(i,133,null,!1);let a=m(s),r=s[a],o=-1,l=0;const c=[];let h=null;for(;n.nextNode();){o++;const e=n.currentNode;for(e.previousSibling===h&&(h=null),t.has(e)&&(c.push(e),null===h&&(h=e)),null!==h&&l++;void 0!==r&&r.index===o;)r.index=null!==h?-1:r.index-l,a=m(s,a),r=s[a]}c.forEach((e=>e.parentNode.removeChild(e)))}const u=e=>{let t=11===e.nodeType?0:1;const i=document.createTreeWalker(e,133,null,!1);for(;i.nextNode();)t++;return t},m=(e,t=-1)=>{for(let i=t+1;i(...t)=>{const i=e(...t);return y.set(i,!0),i},f=e=>"function"==typeof e&&y.has(e),b={},_={};class v{constructor(e,t,i){this.__parts=[],this.template=e,this.processor=t,this.options=i}update(e){let t=0;for(const i of this.__parts)void 0!==i&&i.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=t?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),i=[],s=this.template.parts,n=document.createTreeWalker(e,133,null,!1);let a,r=0,o=0,l=n.nextNode();for(;re}),x=` ${n} `;class k{constructor(e,t,i,s){this.strings=e,this.values=t,this.type=i,this.processor=s}getHTML(){const e=this.strings.length-1;let t="",i=!1;for(let s=0;s-1||i)&&-1===e.indexOf("--\x3e",r+1);const o=d.exec(e);t+=null===o?e+(i?x:a):e.substr(0,o.index)+o[1]+o[2]+"$lit$"+o[3]+n}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return void 0!==w&&(t=w.createHTML(t)),e.innerHTML=t,e}}class S extends k{getHTML(){return`${super.getHTML()}`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,s=t.firstChild;return t.removeChild(s),i(t,s.firstChild),e}}const A=e=>null===e||!("object"==typeof e||"function"==typeof e),T=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class C{constructor(e,t,i){this.dirty=!0,this.element=e,this.name=t,this.strings=i,this.parts=[];for(let e=0;e{try{const e={get capture(){return R=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();class N{constructor(e,t,i){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=i,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;f(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=b,e(this)}if(this.__pendingValue===b)return;const e=this.__pendingValue,t=this.value,i=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),s=null!=e&&(null==t||i);i&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=z(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=b}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const z=e=>e&&(R?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);function I(e){let t=L.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},L.set(e.type,t));let i=t.stringsArray.get(e.strings);if(void 0!==i)return i;const s=e.strings.join(n);return i=t.keyString.get(s),void 0===i&&(i=new o(e,e.getTemplateElement()),t.keyString.set(s,i)),t.stringsArray.set(e.strings,i),i}const L=new Map,q=new WeakMap;const H=new class{handleAttributeExpressions(e,t,i,s){const n=t[0];if("."===n){return new P(e,t.slice(1),i).parts}if("@"===n)return[new N(e,t.slice(1),s.eventContext)];if("?"===n)return[new O(e,t.slice(1),i)];return new C(e,t,i).parts}handleTextExpression(e){return new E(e)}};"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.3.0");const D=(e,...t)=>new k(e,t,"html",H),U=(e,...t)=>new S(e,t,"svg",H),B=(e,t)=>`${e}--${t}`;let V=!0;void 0===window.ShadyCSS?V=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),V=!1);const F=e=>t=>{const i=B(t.type,e);let s=L.get(i);void 0===s&&(s={stringsArray:new WeakMap,keyString:new Map},L.set(i,s));let a=s.stringsArray.get(t.strings);if(void 0!==a)return a;const r=t.strings.join(n);if(a=s.keyString.get(r),void 0===a){const i=t.getTemplateElement();V&&window.ShadyCSS.prepareTemplateDom(i,e),a=new o(t,i),s.keyString.set(r,a)}return s.stringsArray.set(t.strings,a),a},j=["html","svg"],K=new Set,W=(e,t,i)=>{K.add(e);const s=i?i.element:document.createElement("template"),n=t.querySelectorAll("style"),{length:a}=n;if(0===a)return void window.ShadyCSS.prepareTemplateStyles(s,e);const r=document.createElement("style");for(let e=0;e{j.forEach((t=>{const i=L.get(B(t,e));void 0!==i&&i.keyString.forEach((e=>{const{element:{content:t}}=e,i=new Set;Array.from(t.querySelectorAll("style")).forEach((e=>{i.add(e)})),p(e,i)}))}))})(e);const o=s.content;i?function(e,t,i=null){const{element:{content:s},parts:n}=e;if(null==i)return void s.appendChild(t);const a=document.createTreeWalker(s,133,null,!1);let r=m(n),o=0,l=-1;for(;a.nextNode();)for(l++,a.currentNode===i&&(o=u(t),i.parentNode.insertBefore(t,i));-1!==r&&n[r].index===l;){if(o>0){for(;-1!==r;)n[r].index+=o,r=m(n,r);return}r=m(n,r)}}(i,r,o.firstChild):o.insertBefore(r,o.firstChild),window.ShadyCSS.prepareTemplateStyles(s,e);const l=o.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==l)t.insertBefore(l.cloneNode(!0),t.firstChild);else if(i){o.insertBefore(r,o.firstChild);const e=new Set;e.add(r),p(i,e)}};window.JSCompiler_renameProperty=(e,t)=>e;const G={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){switch(t){case Boolean:return null!==e;case Number:return null===e?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},J=(e,t)=>t!==e&&(t==t||e==e),Z={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:J};class X extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();const e=[];return this._classProperties.forEach(((t,i)=>{const s=this._attributeNameForProperty(i,t);void 0!==s&&(this._attributeToPropertyMap.set(s,i),e.push(s))})),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach(((e,t)=>this._classProperties.set(t,e)))}}static createProperty(e,t=Z){if(this._ensureClassProperties(),this._classProperties.set(e,t),t.noAccessor||this.prototype.hasOwnProperty(e))return;const i="symbol"==typeof e?Symbol():`__${e}`,s=this.getPropertyDescriptor(e,i,t);void 0!==s&&Object.defineProperty(this.prototype,e,s)}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(s){const n=this[e];this[t]=s,this.requestUpdateInternal(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||Z}static finalize(){const e=Object.getPrototypeOf(this);if(e.hasOwnProperty("finalized")||e.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const e=this.properties,t=[...Object.getOwnPropertyNames(e),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]];for(const i of t)this.createProperty(i,e[i])}}static _attributeNameForProperty(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}static _valueHasChanged(e,t,i=J){return i(e,t)}static _propertyValueFromAttribute(e,t){const i=t.type,s=t.converter||G,n="function"==typeof s?s:s.fromAttribute;return n?n(e,i):e}static _propertyValueToAttribute(e,t){if(void 0===t.reflect)return;const i=t.type,s=t.converter;return(s&&s.toAttribute||G.toAttribute)(e,i)}initialize(){this._updateState=0,this._updatePromise=new Promise((e=>this._enableUpdatingResolver=e)),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach(((e,t)=>{if(this.hasOwnProperty(t)){const e=this[t];delete this[t],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(t,e)}}))}_applyInstanceProperties(){this._instanceProperties.forEach(((e,t)=>this[t]=e)),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,t,i){t!==i&&this._attributeToProperty(e,i)}_propertyToAttribute(e,t,i=Z){const s=this.constructor,n=s._attributeNameForProperty(e,i);if(void 0!==n){const e=s._propertyValueToAttribute(t,i);if(void 0===e)return;this._updateState=8|this._updateState,null==e?this.removeAttribute(n):this.setAttribute(n,e),this._updateState=-9&this._updateState}}_attributeToProperty(e,t){if(8&this._updateState)return;const i=this.constructor,s=i._attributeToPropertyMap.get(e);if(void 0!==s){const e=i.getPropertyOptions(s);this._updateState=16|this._updateState,this[s]=i._propertyValueFromAttribute(t,e),this._updateState=-17&this._updateState}}requestUpdateInternal(e,t,i){let s=!0;if(void 0!==e){const n=this.constructor;i=i||n.getPropertyOptions(e),n._valueHasChanged(this[e],t,i.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,t),!0!==i.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,i))):s=!1}!this._hasRequestedUpdate&&s&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,t){return this.requestUpdateInternal(e,t),this.updateComplete}async _enqueueUpdate(){this._updateState=4|this._updateState;try{await this._updatePromise}catch(e){}const e=this.performUpdate();return null!=e&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let e=!1;const t=this._changedProperties;try{e=this.shouldUpdate(t),e?this.update(t):this._markUpdated()}catch(t){throw e=!1,this._markUpdated(),t}e&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(t)),this.updated(t))}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach(((e,t)=>this._propertyToAttribute(t,this[t],e))),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}}X.finalized=!0;const Y=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Q=Symbol();class ee{constructor(e,t){if(t!==Q)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return void 0===this._styleSheet&&(Y?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const te=(e,...t)=>{const i=t.reduce(((t,i,s)=>t+(e=>{if(e instanceof ee)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(i)+e[s+1]),e[0]);return new ee(i,Q)};(window.litElementVersions||(window.litElementVersions=[])).push("2.4.0");const ie={};class se extends X{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const e=this.getStyles();if(Array.isArray(e)){const t=(e,i)=>e.reduceRight(((e,i)=>Array.isArray(i)?t(i,e):(e.add(i),e)),i),i=t(e,new Set),s=[];i.forEach((e=>s.unshift(e))),this._styles=s}else this._styles=void 0===e?[]:[e];this._styles=this._styles.map((e=>{if(e instanceof CSSStyleSheet&&!Y){const t=Array.prototype.slice.call(e.cssRules).reduce(((e,t)=>e+t.cssText),"");return new ee(String(t),Q)}return e}))}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?Y?this.renderRoot.adoptedStyleSheets=e.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map((e=>e.cssText)),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){const t=this.render();super.update(e),t!==ie&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)})))}render(){return ie}}se.finalized=!0,se.render=(e,t,i)=>{if(!i||"object"!=typeof i||!i.scopeName)throw new Error("The `scopeName` option is required.");const n=i.scopeName,a=q.has(t),r=V&&11===t.nodeType&&!!t.host,o=r&&!K.has(n),l=o?document.createDocumentFragment():t;if(((e,t,i)=>{let n=q.get(t);void 0===n&&(s(t,t.firstChild),q.set(t,n=new E(Object.assign({templateFactory:I},i))),n.appendInto(t)),n.setValue(e),n.commit()})(e,l,Object.assign({templateFactory:F(n)},i)),o){const e=q.get(l);q.delete(l);const i=e.value instanceof v?e.value.template:void 0;W(n,l,i),s(t,t.firstChild),t.appendChild(l),q.set(t,e)}!a&&r&&window.ShadyCSS.styleElement(t.host)};const ne=!(window.ShadyDOM&&window.ShadyDOM.inUse);let ae,re;function oe(e){ae=(!e||!e.shimcssproperties)&&(ne||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&&(re=window.ShadyCSS.cssBuild);const le=Boolean(window.ShadyCSS&&window.ShadyCSS.disableRuntime);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?ae=window.ShadyCSS.nativeCss:window.ShadyCSS?(oe(window.ShadyCSS),window.ShadyCSS=void 0):oe(window.WebComponents&&window.WebComponents.flags);const ce=ae;class he{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 de(e){return pe(function(e){let t=new he;t.start=0,t.end=e.length;let i=t;for(let s=0,n=e.length;s{":root"===e.selector&&(e.selector="html"),this.transformRule(e)})),e.textContent=Ce(t),t}transformRules(e,t){this._currentElement=t,Ee(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(we,((e,i,s,n)=>this._produceCssProperties(e,i,s,n,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 i={};let s=!1;return Ee(t,(t=>{s=s||t===e,s||t.selector===e.selector&&Object.assign(i,this._cssTextToMap(t.parsedCssText))})),i}_consumeCssProperties(e,t){let i=null;for(;i=xe.exec(e);){let s=i[0],n=i[1],a=i.index,r=a+s.indexOf("@apply"),o=a+s.length,l=e.slice(0,r),c=e.slice(o),h=t?this._fallbacksFromPreviousRules(t):{};Object.assign(h,this._cssTextToMap(l));let d=this._atApplyToCssProperties(n,h);e=`${l}${d}${c}`,xe.lastIndex=a+d.length}return e}_atApplyToCssProperties(e,t){e=e.replace(ze,"");let i=[],s=this._map.get(e);if(s||(this._map.set(e,{}),s=this._map.get(e)),s){let n,a,r;this._currentElement&&(s.dependants[this._currentElement]=!0);const o=s.properties;for(n in o)r=t&&t[n],a=[n,": var(",e,"_-_",n],r&&a.push(",",r.replace(Le,"")),a.push(")"),Le.test(o[n])&&a.push(" !important"),i.push(a.join(""))}return i.join("; ")}_replaceInitialOrInherit(e,t){let i=Ie.exec(t);return i&&(t=i[1]?this._getInitialValueForProperty(e):"apply-shim-inherit"),t}_cssTextToMap(e,t=!1){let i,s,n=e.split(";"),a={};for(let e,r,o=0;o1&&(i=r[0].trim(),s=r.slice(1).join(":"),t&&(s=this._replaceInitialOrInherit(i,s)),a[i]=s));return a}_invalidateMixinEntry(e){if(He)for(let t in e.dependants)t!==this._currentElement&&He(t)}_produceCssProperties(e,t,i,s,n){if(i&&Oe(i,((e,t)=>{t&&this._map.get(t)&&(s=`@apply ${t};`)})),!s)return e;let a=this._consumeCssProperties(""+s,n),r=e.slice(0,e.indexOf("--")),o=this._cssTextToMap(a,!0),l=o,c=this._map.get(t),h=c&&c.properties;h?l=Object.assign(Object.create(h),o):this._map.set(t,l);let d,p,u=[],m=!1;for(d in l)p=o[d],void 0===p&&(p="initial"),h&&!(d in h)&&(m=!0),u.push(`${t}_-_${d}: ${p}`);return m&&this._invalidateMixinEntry(c),c&&(c.properties=l),i&&(r=`${e};${r}`),`${r}${u.join("; ")};`}}De.prototype.detectMixin=De.prototype.detectMixin,De.prototype.transformStyle=De.prototype.transformStyle,De.prototype.transformCustomStyle=De.prototype.transformCustomStyle,De.prototype.transformRules=De.prototype.transformRules,De.prototype.transformRule=De.prototype.transformRule,De.prototype.transformTemplate=De.prototype.transformTemplate,De.prototype._separator="_-_",Object.defineProperty(De.prototype,"invalidCallback",{get:()=>He,set(e){He=e}});const Ue={},Be="_applyShimCurrentVersion",Ve="_applyShimNextVersion",Fe="_applyShimValidatingVersion",je=Promise.resolve();function Ke(e){let t=Ue[e];t&&function(e){e[Be]=e[Be]||0,e[Fe]=e[Fe]||0,e[Ve]=(e[Ve]||0)+1}(t)}function We(e){return e[Be]===e[Ve]}let Ge,Je=null,Ze=window.HTMLImports&&window.HTMLImports.whenReady||null;function Xe(e){requestAnimationFrame((function(){Ze?Ze(e):(Je||(Je=new Promise((e=>{Ge=e})),"complete"===document.readyState?Ge():document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&Ge()}))),Je.then((function(){e&&e()})))}))}const Ye="__shadyCSSCachedStyle";let Qe=null,et=null;class tt{constructor(){this.customStyles=[],this.enqueued=!1,Xe((()=>{window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()}))}enqueueDocumentValidation(){!this.enqueued&&et&&(this.enqueued=!0,Xe(et))}addCustomStyle(e){e.__seenByShadyCSS||(e.__seenByShadyCSS=!0,this.customStyles.push(e),this.enqueueDocumentValidation())}getStyleForCustomStyle(e){if(e[Ye])return e[Ye];let t;return t=e.getStyle?e.getStyle():e,t}processStyles(){const e=this.customStyles;for(let t=0;tQe,set(e){Qe=e}},validateCallback:{get:()=>et,set(e){let t=!1;et||(t=!0),et=e,t&&this.enqueueDocumentValidation()}}});const it=new De;class st{constructor(){this.customStyleInterface=null,it.invalidCallback=Ke}ensure(){this.customStyleInterface||window.ShadyCSS.CustomStyleInterface&&(this.customStyleInterface=window.ShadyCSS.CustomStyleInterface,this.customStyleInterface.transformCallback=e=>{it.transformCustomStyle(e)},this.customStyleInterface.validateCallback=()=>{requestAnimationFrame((()=>{this.customStyleInterface.enqueued&&this.flushCustomStyles()}))})}prepareTemplate(e,t){if(this.ensure(),Me(e))return;Ue[t]=e;let i=it.transformTemplate(e,t);e._styleAst=i}flushCustomStyles(){if(this.ensure(),!this.customStyleInterface)return;let e=this.customStyleInterface.processStyles();if(this.customStyleInterface.enqueued){for(let t=0;t-1?i=t:(s=t,i=e.getAttribute&&e.getAttribute("is")||""):(i=e.is,s=e.extends),{is:i,typeExtension:s}}(e),i=Ue[t];if((!i||!Me(i))&&i&&!We(i)){(function(e){return!We(e)&&e[Fe]===e[Ve]})(i)||(this.prepareTemplate(i,t),function(e){e[Fe]=e[Ve],e._validating||(e._validating=!0,je.then((function(){e[Be]=e[Ve],e._validating=!1})))}(i));let s=e.shadowRoot;if(s){let e=s.querySelector("style");e&&(e.__cssRules=i._styleAst,e.textContent=Ce(i._styleAst))}}}styleDocument(e){this.ensure(),this.styleSubtree(document.body,e)}}if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){const e=new st;let t=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate(t,i,s){e.flushCustomStyles(),e.prepareTemplate(t,i)},prepareTemplateStyles(e,t,i){window.ShadyCSS.prepareTemplate(e,t,i)},prepareTemplateDom(e,t){},styleSubtree(t,i){e.flushCustomStyles(),e.styleSubtree(t,i)},styleElement(t){e.flushCustomStyles(),e.styleElement(t)},styleDocument(t){e.flushCustomStyles(),e.styleDocument(t)},getComputedStyleValue:(e,t)=>Ne(e,t),flushCustomStyles(){e.flushCustomStyles()},nativeCss:ce,nativeShadow:ne,cssBuild:re,disableRuntime:le},t&&(window.ShadyCSS.CustomStyleInterface=t)}window.ShadyCSS.ApplyShim=it,window.JSCompiler_renameProperty=function(e,t){return e};let nt,at,rt=/(url\()([^)]*)(\))/g,ot=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function lt(e,t){if(e&&ot.test(e))return e;if("//"===e)return e;if(void 0===nt){nt=!1;try{const e=new URL("b","http://a");e.pathname="c%20d",nt="http://a/c%20d"===e.href}catch(e){}}if(t||(t=document.baseURI||window.location.href),nt)try{return new URL(e,t).href}catch(t){return e}return at||(at=document.implementation.createHTMLDocument("temp"),at.base=at.createElement("base"),at.head.appendChild(at.base),at.anchor=at.createElement("a"),at.body.appendChild(at.anchor)),at.base.href=t,at.anchor.href=e,at.anchor.href||e}function ct(e,t){return e.replace(rt,(function(e,i,s,n){return i+"'"+lt(s.replace(/["']/g,""),t)+"'"+n}))}function ht(e){return e.substring(0,e.lastIndexOf("/")+1)}const dt=!window.ShadyDOM||!window.ShadyDOM.inUse;Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss);const pt=dt&&"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 ut=window.Polymer&&window.Polymer.rootPath||ht(document.baseURI||window.location.href),mt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,yt=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1,gt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,ft=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,bt=window.Polymer&&window.Polymer.legacyOptimizations||!1,_t=window.Polymer&&window.Polymer.legacyWarnings||!1,vt=window.Polymer&&window.Polymer.syncInitialRender||!1,wt=window.Polymer&&window.Polymer.legacyUndefined||!1,xt=window.Polymer&&window.Polymer.orderedComputed||!1,kt=window.Polymer&&window.Polymer.removeNestedTemplates||!1,St=window.Polymer&&window.Polymer.fastDomIf||!1,At=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,Tt=window.Polymer&&window.Polymer.legacyNoObservedAttributes||!1,Ct=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,$t=0;const Et=function(e){let t=e.__mixinApplications;t||(t=new WeakMap,e.__mixinApplications=t);let i=$t++;return function(s){let n=s.__mixinSet;if(n&&n[i])return s;let a=t,r=a.get(s);if(!r){r=e(s),a.set(s,r);let t=Object.create(r.__mixinSet||n||null);t[i]=!0,r.__mixinSet=t}return r}};let Ot={},Pt={};function Mt(e,t){Ot[e]=Pt[e.toLowerCase()]=t}function Rt(e){return Ot[e]||Pt[e.toLowerCase()]}class Nt extends HTMLElement{static get observedAttributes(){return["id"]}static import(e,t){if(e){let i=Rt(e);return i&&t?i.querySelector(t):i}return null}attributeChangedCallback(e,t,i,s){t!==i&&this.register()}get assetpath(){if(!this.__assetpath){const e=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,t=lt(this.getAttribute("assetpath")||"",e.baseURI);this.__assetpath=ht(t)}return this.__assetpath}register(e){if(e=e||this.id){if(gt&&void 0!==Rt(e))throw Mt(e,null),new Error(`strictTemplatePolicy: dom-module ${e} re-registered`);this.id=e,Mt(e,this),(t=this).querySelector("style")&&console.warn("dom-module %s has style outside template",t.id)}var t}}Nt.prototype.modules=Ot,customElements.define("dom-module",Nt);function zt(e){return Nt.import(e)}function It(e){const t=ct((e.body?e.body:e).textContent,e.baseURI),i=document.createElement("style");return i.textContent=t,i}function Lt(e){const t=e.trim().split(/\s+/),i=[];for(let e=0;eShadyDOM.patch(e):e=>e;function Vt(e){return e.indexOf(".")>=0}function Ft(e){let t=e.indexOf(".");return-1===t?e:e.slice(0,t)}function jt(e,t){return 0===e.indexOf(t+".")}function Kt(e,t){return 0===t.indexOf(e+".")}function Wt(e,t,i){return t+i.slice(e.length)}function Gt(e){if(Array.isArray(e)){let t=[];for(let i=0;i1){for(let e=0;ee[1].toUpperCase())))}function ii(e){return Yt[e]||(Yt[e]=e.replace(ei,"-$1").toLowerCase())}let si=0,ni=0,ai=[],ri=0,oi=!1,li=document.createTextNode("");new window.MutationObserver((function(){oi=!1;const e=ai.length;for(let t=0;t{throw e}))}}ai.splice(0,e),ni+=e})).observe(li,{characterData:!0});const ci={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)}},hi={run:e=>window.requestAnimationFrame(e),cancel(e){window.cancelAnimationFrame(e)}},di={run:e=>(oi||(oi=!0,li.textContent=ri++),ai.push(e),si++),cancel(e){const t=e-ni;if(t>=0){if(!ai[t])throw new Error("invalid async handle: "+e);ai[t]=null}}},pi=di,ui=Et((e=>class extends e{static createProperties(e){const t=this.prototype;for(let i in e)i in t||t._createPropertyAccessor(i)}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,i){let s=this.__data[e],n=this._shouldPropertyChange(e,t,s);return n&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(e in this.__dataOld)&&(this.__dataOld[e]=s),this.__data[e]=t,this.__dataPending[e]=t),n}_isPropertyPending(e){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(e))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,pi.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,i=this.__dataOld;this._shouldPropertiesChange(e,t,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(e,t,i)),this.__dataCounter--}_shouldPropertiesChange(e,t,i){return Boolean(t)}_propertiesChanged(e,t,i){}_shouldPropertyChange(e,t,i){return i!==t&&(i==i||t==t)}attributeChangedCallback(e,t,i,s){t!==i&&this._attributeToProperty(e,i),super.attributeChangedCallback&&super.attributeChangedCallback(e,t,i,s)}_attributeToProperty(e,t,i){if(!this.__serializing){const s=this.__dataAttributes,n=s&&s[e]||e;this[n]=this._deserializeValue(t,i||this.constructor.typeForProperty(n))}}_propertyToAttribute(e,t,i){this.__serializing=!0,i=arguments.length<3?this[e]:i,this._valueToNodeAttribute(this,i,t||this.constructor.attributeNameForProperty(e)),this.__serializing=!1}_valueToNodeAttribute(e,t,i){const s=this._serializeValue(t);"class"!==i&&"name"!==i&&"slot"!==i||(e=Bt(e)),void 0===s?e.removeAttribute(i):e.setAttribute(i,s)}_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}}})),mi={};let yi=HTMLElement.prototype;for(;yi;){let e=Object.getOwnPropertyNames(yi);for(let t=0;t{const t=ui(e);return class extends t{static createPropertiesForAttributes(){let e=this.observedAttributes;for(let t=0;tclass extends e{static _parseTemplate(e,t){if(!e._templateInfo){let i=e._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(t),i.stripWhiteSpace=t&&t.stripWhiteSpace||e.hasAttribute("strip-whitespace"),this._parseTemplateContent(e,i,{parent:null})}return e._templateInfo}static _parseTemplateContent(e,t,i){return this._parseTemplateNode(e.content,t,i)}static _parseTemplateNode(e,t,i){let s=!1,n=e;return"template"!=n.localName||n.hasAttribute("preserve-content")?"slot"===n.localName&&(t.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(n,t,i)||s,vi(n),n.firstChild&&this._parseTemplateChildNodes(n,t,i),n.hasAttributes&&n.hasAttributes()&&(s=this._parseTemplateNodeAttributes(n,t,i)||s),s||i.noted}static _parseTemplateChildNodes(e,t,i){if("script"!==e.localName&&"style"!==e.localName)for(let s,n=e.firstChild,a=0;n;n=s){if("template"==n.localName&&(n=wi(n)),s=n.nextSibling,n.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)n.textContent+=i.textContent,s=i.nextSibling,e.removeChild(i),i=s;if(t.stripWhiteSpace&&!n.textContent.trim()){e.removeChild(n);continue}}let r={parentIndex:a,parentInfo:i};this._parseTemplateNode(n,t,r)&&(r.infoIndex=t.nodeInfoList.push(r)-1),n.parentNode&&a++}}static _parseTemplateNestedTemplate(e,t,i){let s=e,n=this._parseTemplate(s,t);return(n.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=n,!0}static _parseTemplateNodeAttributes(e,t,i){let s=!1,n=Array.from(e.attributes);for(let a,r=n.length-1;a=n[r];r--)s=this._parseTemplateNodeAttribute(e,t,i,a.name,a.value)||s;return s}static _parseTemplateNodeAttribute(e,t,i,s,n){return"on-"===s.slice(0,3)?(e.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:n}),!0):"id"===s&&(i.id=n,!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 i=(t=t||this.constructor._parseTemplate(e)).nodeInfoList,s=t.content||e.content,n=document.importNode(s,!0);n.__noInsertionPoint=!t.hasInsertionPoint;let a=n.nodeList=new Array(i.length);n.$={};for(let e,s=0,r=i.length;s!e.literal)).length+(s.dynamicFn?1:0)}for(let e in s)t[e]||n.push(e);return{counts:i,ready:n,total:a}}(e);for(;s=a.shift();){t.set(s,t.size);const e=i[s];e&&e.forEach((e=>{const t=e.info.methodInfo;--r,0==--n[t]&&a.push(t)}))}if(0!==r){const t=e;console.warn(`Computed graph for ${t.localName} incomplete; circular?`)}e.constructor.__orderedComputedDeps=t}return t}(e),r=[];for(let e in t)Bi(e,n,r,a,s);let o;for(;o=r.shift();)Vi(e,"",t,i,o)&&Bi(o.methodInfo,n,r,a,s);Object.assign(i,e.__dataOld),Object.assign(t,e.__dataPending),e.__dataPending=null}else{let a=t;for(;Mi(e,n,a,i,s);)Object.assign(i,e.__dataOld),Object.assign(t,e.__dataPending),a=e.__dataPending,e.__dataPending=null}}const Ui=(e,t,i)=>{let s=0,n=t.length-1,a=-1;for(;s<=n;){const r=s+n>>1,o=i.get(t[r].methodInfo)-i.get(e.methodInfo);if(o<0)s=r+1;else{if(!(o>0)){a=r;break}n=r-1}}a<0&&(a=n+1),t.splice(a,0,e)},Bi=(e,t,i,s,n)=>{const a=t[n?Ft(e):e];if(a)for(let t=0;tc.source.length&&"property"==l.kind&&!l.isCompound&&o.__isPropertyEffectsClient&&o.__dataHasAccessor&&o.__dataHasAccessor[l.target]){let s=i[t];t=Wt(c.source,l.target,t),o._setPendingPropertyOrPath(t,s,!1,!0)&&e._enqueueClient(o)}else{let r=n.evaluator._evaluateBinding(e,c,t,i,s,a);r!==$i&&function(e,t,i,s,n){n=function(e,t,i,s){if(i.isCompound){let n=e.__dataCompoundStorage[i.target];n[s.compoundIndex]=t,t=n.join("")}"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==e.localName&&"textarea"!==e.localName)||(t=null==t?"":t));return t}(t,n,i,s),mt&&(n=mt(n,i.target,i.kind,t));if("attribute"==i.kind)e._valueToNodeAttribute(t,n,i.target);else{let s=i.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[s]?t[Ei.READ_ONLY]&&t[Ei.READ_ONLY][s]||t._setPendingProperty(s,n)&&e._enqueueClient(t):e._setUnmanagedPropertyToNode(t,s,n)}}(e,o,l,c,r)}}function Wi(e,t){if(t.isCompound){let i=e.__dataCompoundStorage||(e.__dataCompoundStorage={}),s=t.parts,n=new Array(s.length);for(let e=0;e="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=t.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(t),i.literal=!0}return i.literal||(i.rootProperty=Ft(t),i.structured=Vt(t),i.structured&&(i.wildcard=".*"==t.slice(-2),i.wildcard&&(i.name=t.slice(0,-2)))),i}function is(e,t,i){let s=Zt(e,i);return void 0===s&&(s=t[i]),s}function ss(e,t,i,s){const n={indexSplices:s};wt&&!e._overrideLegacyUndefined&&(t.splices=n),e.notifyPath(i+".splices",n),e.notifyPath(i+".length",t.length),wt&&!e._overrideLegacyUndefined&&(n.indexSplices=[])}function ns(e,t,i,s,n,a){ss(e,t,i,[{index:s,addedCount:n,removed:a,object:t,type:"splice"}])}const as=Et((e=>{const t=Ti(gi(e));return class 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 Ei}_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(rs.length){let e=rs[rs.length-1];e._enqueueClient(this),this.__dataHost=e}}_initializeProtoProperties(e){this.__data=Object.create(e),this.__dataPending=Object.create(e),this.__dataOld={}}_initializeInstanceProperties(e){let t=this[Ei.READ_ONLY];for(let i in e)t&&t[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=e[i])}_addPropertyEffect(e,t,i){this._createPropertyAccessor(e,t==Ei.READ_ONLY);let s=Pi(this,t,!0)[e];s||(s=this[t][e]=[]),s.push(i)}_removePropertyEffect(e,t,i){let s=Pi(this,t,!0)[e],n=s.indexOf(i);n>=0&&s.splice(n,1)}_hasPropertyEffect(e,t){let i=this[t];return Boolean(i&&i[e])}_hasReadOnlyEffect(e){return this._hasPropertyEffect(e,Ei.READ_ONLY)}_hasNotifyEffect(e){return this._hasPropertyEffect(e,Ei.NOTIFY)}_hasReflectEffect(e){return this._hasPropertyEffect(e,Ei.REFLECT)}_hasComputedEffect(e){return this._hasPropertyEffect(e,Ei.COMPUTE)}_setPendingPropertyOrPath(e,t,i,s){if(s||Ft(Array.isArray(e)?e[0]:e)!==e){if(!s){let i=Zt(this,e);if(!(e=Xt(this,e,t))||!super._shouldPropertyChange(e,t,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(e,t,i))return function(e,t,i){let s=e.__dataLinkedPaths;if(s){let n;for(let a in s){let r=s[a];Kt(a,t)?(n=Wt(a,r,t),e._setPendingPropertyOrPath(n,i,!0,!0)):Kt(r,t)&&(n=Wt(r,a,t),e._setPendingPropertyOrPath(n,i,!0,!0))}}}(this,e,t),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[e])return this._setPendingProperty(e,t,i);this[e]=t}return!1}_setUnmanagedPropertyToNode(e,t,i){i===e[t]&&"object"!=typeof i||("className"===t&&(e=Bt(e)),e[t]=i)}_setPendingProperty(e,t,i){let s=this.__dataHasPaths&&Vt(e),n=s?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(e,t,n[e])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),e in this.__dataOld||(this.__dataOld[e]=this.__data[e]),s?this.__dataTemp[e]=t:this.__data[e]=t,this.__dataPending[e]=t,(s||this[Ei.NOTIFY]&&this[Ei.NOTIFY][e])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[e]=i),!0)}_setProperty(e,t){this._setPendingProperty(e,t,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(e){this.__dataPendingClients=this.__dataPendingClients||[],e!==this&&this.__dataPendingClients.push(e)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let e=this.__dataPendingClients;if(e){this.__dataPendingClients=null;for(let t=0;t{Mi(this,e.propertyEffects,t,i,s,e.nodeList);for(let n=e.firstChild;n;n=n.nextSibling)this._runEffectsForTemplate(n,t,i,s)};e.runEffects?e.runEffects(n,t,s):n(t,s)}linkPaths(e,t){e=Gt(e),t=Gt(t),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[e]=t}unlinkPaths(e){e=Gt(e),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[e]}notifySplices(e,t){let i={path:""};ss(this,Zt(this,e,i),i.path,t)}get(e,t){return Zt(t||this,e)}set(e,t,i){i?Xt(i,e,t):this[Ei.READ_ONLY]&&this[Ei.READ_ONLY][e]||this._setPendingPropertyOrPath(e,t,!0)&&this._invalidateProperties()}push(e,...t){let i={path:""},s=Zt(this,e,i),n=s.length,a=s.push(...t);return t.length&&ns(this,s,i.path,n,t.length,[]),a}pop(e){let t={path:""},i=Zt(this,e,t),s=Boolean(i.length),n=i.pop();return s&&ns(this,i,t.path,i.length,0,[n]),n}splice(e,t,i,...s){let n,a={path:""},r=Zt(this,e,a);return t<0?t=r.length-Math.floor(-t):t&&(t=Math.floor(t)),n=2===arguments.length?r.splice(t):r.splice(t,i,...s),(s.length||n.length)&&ns(this,r,a.path,t,s.length,n),n}shift(e){let t={path:""},i=Zt(this,e,t),s=Boolean(i.length),n=i.shift();return s&&ns(this,i,t.path,0,0,[n]),n}unshift(e,...t){let i={path:""},s=Zt(this,e,i),n=s.unshift(...t);return t.length&&ns(this,s,i.path,0,t.length,[]),n}notifyPath(e,t){let i;if(1==arguments.length){let s={path:""};t=Zt(this,e,s),i=s.path}else i=Array.isArray(e)?Gt(e):e;this._setPendingPropertyOrPath(i,t,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(e,t){var i;this._addPropertyEffect(e,Ei.READ_ONLY),t&&(this["_set"+(i=e,i[0].toUpperCase()+i.substring(1))]=function(t){this._setProperty(e,t)})}_createPropertyObserver(e,t,i){let s={property:e,method:t,dynamicFn:Boolean(i)};this._addPropertyEffect(e,Ei.OBSERVE,{fn:zi,info:s,trigger:{name:e}}),i&&this._addPropertyEffect(t,Ei.OBSERVE,{fn:zi,info:s,trigger:{name:t}})}_createMethodObserver(e,t){let i=es(e);if(!i)throw new Error("Malformed observer expression '"+e+"'");Ji(this,i,Ei.OBSERVE,Zi,null,t)}_createNotifyingProperty(e){this._addPropertyEffect(e,Ei.NOTIFY,{fn:qi,info:{eventName:ii(e)+"-changed",property:e}})}_createReflectedProperty(e){let t=this.constructor.attributeNameForProperty(e);"-"===t[0]?console.warn("Property "+e+" cannot be reflected to attribute "+t+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(e,Ei.REFLECT,{fn:Hi,info:{attrName:t}})}_createComputedProperty(e,t,i){let s=es(t);if(!s)throw new Error("Malformed computed expression '"+t+"'");const n=Ji(this,s,Ei.COMPUTE,Vi,e,i);Pi(this,"__computeInfo")[e]=n}_marshalArgs(e,t,i){const s=this.__data,n=[];for(let a=0,r=e.length;a1)return $i;n[a]=c}return n}static addPropertyEffect(e,t,i){this.prototype._addPropertyEffect(e,t,i)}static createPropertyObserver(e,t,i){this.prototype._createPropertyObserver(e,t,i)}static createMethodObserver(e,t){this.prototype._createMethodObserver(e,t)}static createNotifyingProperty(e){this.prototype._createNotifyingProperty(e)}static createReadOnlyProperty(e,t){this.prototype._createReadOnlyProperty(e,t)}static createReflectedProperty(e){this.prototype._createReflectedProperty(e)}static createComputedProperty(e,t,i){this.prototype._createComputedProperty(e,t,i)}static bindTemplate(e){return this.prototype._bindTemplate(e)}_bindTemplate(e,t){let i=this.constructor._parseTemplate(e),s=this.__preBoundTemplateInfo==i;if(!s)for(let e in i.propertyEffects)this._createPropertyAccessor(e);if(t)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const t=e._parentTemplateInfo||this.__templateInfo,s=t.lastChild;i.parent=t,t.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:t.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(e,t,i){(e.hostProps=e.hostProps||{})[t]=!0;let s=e.propertyEffects=e.propertyEffects||{};(s[t]=s[t]||[]).push(i)}_stampTemplate(e,t){t=t||this._bindTemplate(e,!0),rs.push(this);let i=super._stampTemplate(e,t);if(rs.pop(),t.nodeList=i.nodeList,!t.wasPreBound){let e=t.childNodes=[];for(let t=i.firstChild;t;t=t.nextSibling)e.push(t)}return i.templateInfo=t,function(e,t){let{nodeList:i,nodeInfoList:s}=t;if(s.length)for(let t=0;tn&&s.push({literal:e.slice(n,i.index)});let a=i[1][0],r=Boolean(i[2]),o=i[3].trim(),l=!1,c="",h=-1;"{"==a&&(h=o.indexOf("::"))>0&&(c=o.substring(h+2),o=o.substring(0,h),l=!0);let d=es(o),p=[];if(d){let{args:e,methodName:i}=d;for(let t=0;t{const t=ui(e);function i(e){const t=Object.getPrototypeOf(e);return t.prototype instanceof n?t:null}function s(e){if(!e.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",e))){let t=null;if(e.hasOwnProperty(JSCompiler_renameProperty("properties",e))){const i=e.properties;i&&(t=function(e){const t={};for(let i in e){const s=e[i];t[i]="function"==typeof s?{type:s}:s}return t}(i))}e.__ownProperties=t}return e.__ownProperties}class n extends t{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){this.prototype;const e=this._properties;this.__observedAttributes=e?Object.keys(e).map((e=>this.prototype._addPropertyToAttributeMap(e))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const e=i(this);e&&e.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const e=s(this);e&&this.createProperties(e)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const e=i(this);this.__properties=Object.assign({},e&&e._properties,s(this))}return this.__properties}static typeForProperty(e){const t=this._properties[e];return t&&t.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return n})),ls=window.ShadyCSS&&window.ShadyCSS.cssBuild,cs=Et((e=>{const t=os(as(e));function i(e,t,i,s){i.computed&&(i.readOnly=!0),i.computed&&(e._hasReadOnlyEffect(t)?console.warn(`Cannot redefine computed property '${t}'.`):e._createComputedProperty(t,i.computed,s)),i.readOnly&&!e._hasReadOnlyEffect(t)?e._createReadOnlyProperty(t,!i.computed):!1===i.readOnly&&e._hasReadOnlyEffect(t)&&console.warn(`Cannot make readOnly property '${t}' non-readOnly.`),i.reflectToAttribute&&!e._hasReflectEffect(t)?e._createReflectedProperty(t):!1===i.reflectToAttribute&&e._hasReflectEffect(t)&&console.warn(`Cannot make reflected property '${t}' non-reflected.`),i.notify&&!e._hasNotifyEffect(t)?e._createNotifyingProperty(t):!1===i.notify&&e._hasNotifyEffect(t)&&console.warn(`Cannot make notify property '${t}' non-notify.`),i.observer&&e._createPropertyObserver(t,i.observer,s[i.observer]),e._addPropertyToAttributeMap(t)}function s(e,t,i,s){if(!ls){const n=t.content.querySelectorAll("style"),a=Ht(t),r=function(e){let t=zt(e);return t?Dt(t):[]}(i),o=t.content.firstElementChild;for(let i=0;i{t+=e.textContent,e.parentNode.removeChild(e)})),e._styleSheet=new CSSStyleSheet,e._styleSheet.replaceSync(t)}}}return class extends t{static get polymerElementVersion(){return"3.4.1"}static _finalizeClass(){t._finalizeClass.call(this);const e=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;e&&this.createObservers(e,this._properties),this._prepareTemplate()}static _prepareTemplate(){let e=this.template;e&&("string"==typeof e?(console.error("template getter must return HTMLTemplateElement"),e=null):bt||(e=e.cloneNode(!0))),this.prototype._template=e}static createProperties(e){for(let t in e)i(this.prototype,t,e[t],e)}static createObservers(e,t){const i=this.prototype;for(let s=0;s{this._timer=null,ds.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),ds.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}static debounce(e,t,i){return e instanceof hs?e._cancelAsync():e=new hs,e.setConfig(t,i),e}}let ds=new Set;const ps=function(e){ds.add(e)},us=function(){const e=Boolean(ds.size);return ds.forEach((e=>{try{e.flush()}catch(e){setTimeout((()=>{throw e}))}})),e};let ms="string"==typeof document.head.style.touchAction,ys="__polymerGestures",gs="__polymerGesturesHandled",fs="__polymerGesturesTouchAction",bs=["mousedown","mousemove","mouseup","click"],_s=[0,1,4,2],vs=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(e){return!1}}();function ws(e){return bs.indexOf(e)>-1}let xs=!1;function ks(e){if(!ws(e)&&"touchend"!==e)return ms&&xs&&yt?{passive:!0}:void 0}!function(){try{let e=Object.defineProperty({},"passive",{get(){xs=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}}();let Ss=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);const As=[],Ts={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},Cs={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function $s(e){let t=Array.prototype.slice.call(e.labels||[]);if(!t.length){t=[];let i=e.getRootNode();if(e.id){let s=i.querySelectorAll(`label[for = ${e.id}]`);for(let e=0;e-1}if(s[e]===Ms.mouse.target)return}if(t)return;e.preventDefault(),e.stopPropagation()}};function Os(e){let t=Ss?["click"]:bs;for(let i,s=0;se.composedPath&&e.composedPath()||[],Is={},Ls=[];function qs(e){const t=zs(e);return t.length>0?t[0]:e.target}function Hs(e){let t,i=e.type,s=e.currentTarget.__polymerGestures;if(!s)return;let n=s[i];if(n){if(!e[gs]&&(e[gs]={},"touch"===i.slice(0,5))){let t=(e=e).changedTouches[0];if("touchstart"===i&&1===e.touches.length&&(Ms.touch.id=t.identifier),Ms.touch.id!==t.identifier)return;ms||"touchstart"!==i&&"touchmove"!==i||function(e){let t=e.changedTouches[0],i=e.type;if("touchstart"===i)Ms.touch.x=t.clientX,Ms.touch.y=t.clientY,Ms.touch.scrollDecided=!1;else if("touchmove"===i){if(Ms.touch.scrollDecided)return;Ms.touch.scrollDecided=!0;let i=function(e){let t="auto",i=zs(e);for(let e,s=0;sn:"pan-y"===i&&(s=n>a)),s?e.preventDefault():js("track")}}(e)}if(t=e[gs],!t.skip){for(let i,s=0;s-1&&i.reset&&i.reset();for(let s,a=0;a{e.style.touchAction=t})),e[fs]=t}function Fs(e,t,i){let s=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,Bt(e).dispatchEvent(s),s.defaultPrevented){let e=i.preventer||i.sourceEvent;e&&e.preventDefault&&e.preventDefault()}}function js(e){let t=function(e){for(let t,i=0;i=5||n>=5}function Gs(e,t,i){if(!t)return;let s,n=e.moves[e.moves.length-2],a=e.moves[e.moves.length-1],r=a.x-e.x,o=a.y-e.y,l=0;n&&(s=a.x-n.x,l=a.y-n.y),Fs(t,"track",{state:e.state,x:i.clientX,y:i.clientY,dx:r,dy:o,ddx:s,ddy:l,sourceEvent:i,hover:function(){return function(e,t){let i=document.elementFromPoint(e,t),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){let n=s;if(s=s.shadowRoot.elementFromPoint(e,t),n===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)}})}function Js(e,t,i){let s=Math.abs(t.clientX-e.x),n=Math.abs(t.clientY-e.y),a=qs(i||t);!a||Cs[a.localName]&&a.hasAttribute("disabled")||(isNaN(s)||isNaN(n)||s<=25&&n<=25||function(e){if("click"===e.type){if(0===e.detail)return!0;let t=qs(e);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return!0;let i=t.getBoundingClientRect(),s=e.pageX,n=e.pageY;return!(s>=i.left&&s<=i.right&&n>=i.top&&n<=i.bottom)}return!1}(t))&&(e.prevent||Fs(a,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:i}))}Bs({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){Ns(this.info)},mousedown:function(e){if(!Ps(e))return;let t=qs(e),i=this;Rs(this.info,(function(e){Ps(e)||(Ks("up",t,e),Ns(i.info))}),(function(e){Ps(e)&&Ks("up",t,e),Ns(i.info)})),Ks("down",t,e)},touchstart:function(e){Ks("down",qs(e),e.changedTouches[0],e)},touchend:function(e){Ks("up",qs(e),e.changedTouches[0],e)}}),Bs({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(e){this.moves.length>2&&this.moves.shift(),this.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Ns(this.info)},mousedown:function(e){if(!Ps(e))return;let t=qs(e),i=this,s=function(e){let s=e.clientX,n=e.clientY;Ws(i.info,s,n)&&(i.info.state=i.info.started?"mouseup"===e.type?"end":"track":"start","start"===i.info.state&&js("tap"),i.info.addMove({x:s,y:n}),Ps(e)||(i.info.state="end",Ns(i.info)),t&&Gs(i.info,t,e),i.info.started=!0)};Rs(this.info,s,(function(e){i.info.started&&s(e),Ns(i.info)})),this.info.x=e.clientX,this.info.y=e.clientY},touchstart:function(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove:function(e){let t=qs(e),i=e.changedTouches[0],s=i.clientX,n=i.clientY;Ws(this.info,s,n)&&("start"===this.info.state&&js("tap"),this.info.addMove({x:s,y:n}),Gs(this.info,t,i),this.info.state="track",this.info.started=!0)},touchend:function(e){let t=qs(e),i=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Gs(this.info,t,i))}}),Bs({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown:function(e){Ps(e)&&(this.info.x=e.clientX,this.info.y=e.clientY)},click:function(e){Ps(e)&&Js(this.info,e)},touchstart:function(e){const t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchend:function(e){Js(this.info,e.changedTouches[0],e)}});const Zs=Et((e=>class extends e{_addEventListenerToNode(e,t,i){Ds(e,t,i)||super._addEventListenerToNode(e,t,i)}_removeEventListenerFromNode(e,t,i){Us(e,t,i)||super._removeEventListenerFromNode(e,t,i)}})),Xs=/:host\(:dir\((ltr|rtl)\)\)/g,Ys=/([\s\w-#\.\[\]\*]*):dir\((ltr|rtl)\)/g,Qs=/:dir\((?:ltr|rtl)\)/,en=Boolean(window.ShadyDOM&&window.ShadyDOM.inUse),tn=[];let sn=null,nn="";function an(){nn=document.documentElement.getAttribute("dir")}function rn(e){if(!e.__autoDirOptOut){e.setAttribute("dir",nn)}}function on(){an(),nn=document.documentElement.getAttribute("dir");for(let e=0;e{en||sn||(an(),sn=new MutationObserver(on),sn.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}));const t=gi(e);class i extends t{static _processStyleText(e,i){return e=t._processStyleText.call(this,e,i),!en&&Qs.test(e)&&(e=this._replaceDirInCssText(e),this.__activateDir=!0),e}static _replaceDirInCssText(e){let t=e;return t=t.replace(Xs,':host([dir="$1"])'),t=t.replace(Ys,':host([dir="$2"]) $1'),t}constructor(){super(),this.__autoDirOptOut=!1}ready(){super.ready(),this.__autoDirOptOut=this.hasAttribute("dir")}connectedCallback(){t.prototype.connectedCallback&&super.connectedCallback(),this.constructor.__activateDir&&(sn&&sn.takeRecords().length&&on(),tn.push(this),rn(this))}disconnectedCallback(){if(t.prototype.disconnectedCallback&&super.disconnectedCallback(),this.constructor.__activateDir){const e=tn.indexOf(this);e>-1&&tn.splice(e,1)}}}return i.__activateDir=!1,i}));let cn=!1,hn=[],dn=[];function pn(){cn=!0,requestAnimationFrame((function(){cn=!1,function(e){for(;e.length;)un(e.shift())}(hn),setTimeout((function(){!function(e){for(let t=0,i=e.length;t{throw e}))}}function mn(e,t,i){cn||pn(),dn.push([e,t,i])}function yn(){document.body.removeAttribute("unresolved")}function gn(e,t,i){return{index:e,removed:t,addedCount:i}}"interactive"===document.readyState||"complete"===document.readyState?yn():window.addEventListener("DOMContentLoaded",yn);function fn(e,t,i,s,n,a){let r,o=0,l=0,c=Math.min(i-t,a-n);if(0==t&&0==n&&(o=function(e,t,i){for(let s=0;s0||i>0;){if(0==t){n.push(2),i--;continue}if(0==i){n.push(3),t--;continue}let a,r=e[t-1][i-1],o=e[t-1][i],l=e[t][i-1];a=ovn(e)?Bt(e=e).assignedNodes({flatten:!0}):[e])).reduce(((e,t)=>e.concat(t)),[])}constructor(e,t){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=e,this.callback=t,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){vn(this._target)?this._listenSlots([this._target]):Bt(this._target).children&&(this._listenSlots(Bt(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(e=>{this._processMutations(e)})):(this._nativeChildrenObserver=new MutationObserver((e=>{this._processMutations(e)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){vn(this._target)?this._unlistenSlots([this._target]):Bt(this._target).children&&(this._unlistenSlots(Bt(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,di.run((()=>this.flush())))}_processMutations(e){this._processSlotMutations(e),this.flush()}_processSlotMutations(e){if(e)for(let t=0;t{"activeElement"!=t&&(e.prototype[t]=Tn.prototype[t])})),Cn(e.prototype,["classList"]),En=e,Object.defineProperties($n.prototype,{localTarget:{get(){const e=this.event.currentTarget,t=e&&On(e).getOwnerRoot(),i=this.path;for(let e=0;e{for(;e;){const t=Object.getOwnPropertyDescriptor(e,"observedAttributes");if(t)return t.get;e=Object.getPrototypeOf(e.prototype).constructor}return()=>[]};Et((e=>{const t=cs(e);let i=Nn(t);return class extends t{constructor(){super(),this.__isUpgradeDisabled}static get observedAttributes(){return i.call(this).concat("disable-upgrade")}_initializeProperties(){this.hasAttribute("disable-upgrade")?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(e){return super._canApplyPropertyDefault(e)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(e))}attributeChangedCallback(e,t,i,s){"disable-upgrade"==e?this.__isUpgradeDisabled&&null==i&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,Bt(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(e,t,i,s)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}}));let zn=window.ShadyCSS;const In=Et((e=>{const t=Zs(cs(e)),i=ls?t:ln(t),s=Nn(i),n={x:"pan-x",y:"pan-y",none:"none",all:"auto"};class a extends i{constructor(){super(),this.isAttached,this.__boundListeners,this._debouncers,this.__isUpgradeDisabled,this.__needsAttributesAtConnected,this._legacyForceObservedAttributes}static get importMeta(){return this.prototype.importMeta}created(){}__attributeReaction(e,t,i){(this.__dataAttributes&&this.__dataAttributes[e]||"disable-upgrade"===e)&&this.attributeChangedCallback(e,t,i,null)}setAttribute(e,t){if(Tt&&!this._legacyForceObservedAttributes){const i=this.getAttribute(e);super.setAttribute(e,t),this.__attributeReaction(e,i,String(t))}else super.setAttribute(e,t)}removeAttribute(e){if(Tt&&!this._legacyForceObservedAttributes){const t=this.getAttribute(e);super.removeAttribute(e),this.__attributeReaction(e,t,null)}else super.removeAttribute(e)}static get observedAttributes(){return Tt&&!this.prototype._legacyForceObservedAttributes?(this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))||(this.__observedAttributes=[],this.prototype),this.__observedAttributes):s.call(this).concat("disable-upgrade")}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(e){return super._canApplyPropertyDefault(e)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(e))}connectedCallback(){this.__needsAttributesAtConnected&&this._takeAttributes(),this.__isUpgradeDisabled||(super.connectedCallback(),this.isAttached=!0,this.attached())}attached(){}disconnectedCallback(){this.__isUpgradeDisabled||(super.disconnectedCallback(),this.isAttached=!1,this.detached())}detached(){}attributeChangedCallback(e,t,i,s){t!==i&&("disable-upgrade"==e?this.__isUpgradeDisabled&&null==i&&(this._initializeProperties(),this.__isUpgradeDisabled=!1,Bt(this).isConnected&&this.connectedCallback()):(super.attributeChangedCallback(e,t,i,s),this.attributeChanged(e,t,i)))}attributeChanged(e,t,i){}_initializeProperties(){if(bt&&this.hasAttribute("disable-upgrade"))this.__isUpgradeDisabled=!0;else{let e=Object.getPrototypeOf(this);e.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",e))||(this._registered(),e.__hasRegisterFinished=!0),super._initializeProperties(),this.root=this,this.created(),Tt&&!this._legacyForceObservedAttributes&&(this.hasAttributes()?this._takeAttributes():this.parentNode||(this.__needsAttributesAtConnected=!0)),this._applyListeners()}}_takeAttributes(){const e=this.attributes;for(let t=0,i=e.length;t{if(!Rn(e,n))return;const t=Array.from(Pn.nativeMethods.querySelectorAll.call(e,"*"));t.push(e);for(let e=0;e{for(let t=0;t0?ci.after(i):di,t.bind(this))}isDebouncerActive(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];return!(!t||!t.isActive())}flushDebouncer(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];t&&t.flush()}cancelDebouncer(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];t&&t.cancel()}async(e,t){return t>0?ci.run(e.bind(this),t):~di.run(e.bind(this))}cancelAsync(e){e<0?di.cancel(~e):ci.cancel(e)}create(e,t){let i=document.createElement(e);if(t)if(i.setProperties)i.setProperties(t);else for(let e in t)i[e]=t[e];return i}elementMatches(e,t){return An(t||this,e)}toggleAttribute(e,t){let i=this;return 3===arguments.length&&(i=arguments[2]),1==arguments.length&&(t=!i.hasAttribute(e)),t?(Bt(i).setAttribute(e,""),!0):(Bt(i).removeAttribute(e),!1)}toggleClass(e,t,i){i=i||this,1==arguments.length&&(t=!i.classList.contains(e)),t?i.classList.add(e):i.classList.remove(e)}transform(e,t){(t=t||this).style.webkitTransform=e,t.style.transform=e}translate3d(e,t,i,s){s=s||this,this.transform("translate3d("+e+","+t+","+i+")",s)}arrayDelete(e,t){let i;if(Array.isArray(e)){if(i=e.indexOf(t),i>=0)return e.splice(i,1)}else{if(i=Zt(this,e).indexOf(t),i>=0)return this.splice(e,i,1)}return null}_logger(e,t){switch(Array.isArray(t)&&1===t.length&&Array.isArray(t[0])&&(t=t[0]),e){case"log":case"warn":case"error":console[e](...t)}}_log(...e){this._logger("log",e)}_warn(...e){this._logger("warn",e)}_error(...e){this._logger("error",e)}_logf(e,...t){return["[%s::%s]",this.is,e,...t]}}return a.prototype.is="",a})),Ln={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,listeners:!0,hostAttributes:!0},qn={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0,_noAccessors:!0},Hn=Object.assign({listeners:!0,hostAttributes:!0,properties:!0,observers:!0},qn);function Dn(e,t,i,s){!function(e,t,i){const s=e._noAccessors,n=Object.getOwnPropertyNames(e);for(let a=0;a=0;s--){let n=e[s];n?Array.isArray(n)?Un(n,t):t.indexOf(n)<0&&(!i||i.indexOf(n)<0)&&t.unshift(n):console.warn("behavior is null, check for missing or 404 import")}return t}function Bn(e,t){for(const i in t){const s=e[i],n=t[i];e[i]=!("value"in n)&&s&&"value"in s?Object.assign({value:s.value},n):n}}const Vn=In(HTMLElement);function Fn(e,t,i){let s;const n={};class a extends t{static _finalizeClass(){if(this.hasOwnProperty(JSCompiler_renameProperty("generatedFrom",this))){if(s)for(let e,t=0;t=0;t--){const i=e[t];for(let e in i)this._ensureAttribute(e,i[e])}super._ensureAttributes()}ready(){super.ready();let e=n.ready;if(e)for(let t=0;t{s&&function(e,t,i){for(let s=0;sclass extends e{_shouldPropertyChange(e,t,i){return Kn(this,e,t,i,!0)}})),Gn=Et((e=>class extends e{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(e,t,i){return Kn(this,e,t,i,this.mutableData)}}));Wn._mutablePropertyChange=Kn;let Jn=null;function Zn(){return Jn}Zn.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Zn,writable:!0}});const Xn=as(Zn),Yn=Wn(Xn);const Qn=as(class{});function ea(e,t){for(let i=0;i{e.model=this,i(e)}));else{let s=this.__dataHost.__dataHost;s&&s._addEventListenerToNode(e,t,i)}}_showHideChildren(e){ea(e,this.children)}_setUnmanagedPropertyToNode(e,t,i){e.__hideTemplateChildren__&&e.nodeType==Node.TEXT_NODE&&"textContent"==t?e.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(e,t,i)}get parentModel(){let e=this.__parentModel;if(!e){let t;e=this;do{e=e.__dataHost.__dataHost}while((t=e.__templatizeOptions)&&!t.parentModel);this.__parentModel=e}return e}dispatchEvent(e){return!0}}const ia=Wn(ta);function sa(e){let t=e.__dataHost;return t&&t._methodHost||t}function na(e,t,i){let s=i.mutableData?ia:ta;la.mixin&&(s=la.mixin(s));let n=class extends s{};return n.prototype.__templatizeOptions=i,n.prototype._bindTemplate(e),function(e,t,i,s){let n=i.hostProps||{};for(let t in s.instanceProps){delete n[t];let i=s.notifyInstanceProp;i&&e.prototype._addPropertyEffect(t,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:oa(t,i)})}if(s.forwardHostProp&&t.__dataHost)for(let t in n)i.hasHostProps||(i.hasHostProps=!0),e.prototype._addPropertyEffect(t,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(e,t,i){e.__dataHost._setPendingPropertyOrPath("_host_"+t,i[t],!0,!0)}})}(n,e,t,i),n}function aa(e,t,i,s){let n=i.forwardHostProp;if(n&&t.hasHostProps){const a="template"==e.localName;let r=t.templatizeTemplateClass;if(!r){if(a){let e=i.mutableData?Yn:Xn;class s extends e{}r=t.templatizeTemplateClass=s}else{const i=e.constructor;class s extends i{}r=t.templatizeTemplateClass=s}let o=t.hostProps;for(let e in o)r.prototype._addPropertyEffect("_host_"+e,r.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:ra(e,n)}),r.prototype._createNotifyingProperty("_host_"+e);_t&&s&&function(e,t,i){const s=i.constructor._properties,{propertyEffects:n}=e,{instanceProps:a}=t;for(let e in n)if(!(s[e]||a&&a[e])){const t=n[e];for(let i=0;i can only be templatized once");e.__templatizeOwner=t;let s=(t?t.constructor:ta)._parseTemplate(e),n=s.templatizeInstanceClass;n||(n=na(e,s,i),s.templatizeInstanceClass=n);const a=sa(e);aa(e,s,i,a);let r=class extends n{};return r.prototype._methodHost=a,r.prototype.__dataHost=e,r.prototype.__templatizeOwner=t,r.prototype.__hostProps=s.hostProps,r=r,r}let ca=!1;function ha(){if(bt&&!dt){if(!ca){ca=!0;const e=document.createElement("style");e.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(e)}return!0}return!1}const da=Zs(Gn(as(HTMLElement)));customElements.define("dom-bind",class extends da{static get observedAttributes(){return["mutable-data"]}constructor(){if(super(),gt)throw new Error("strictTemplatePolicy: dom-bind not allowed");this.root=null,this.$=null,this.__children=null}attributeChangedCallback(e,t,i,s){this.mutableData=!0}connectedCallback(){ha()||(this.style.display="none"),this.render()}disconnectedCallback(){this.__removeChildren()}__insertChildren(){Bt(Bt(this).parentNode).insertBefore(this.root,this)}__removeChildren(){if(this.__children)for(let e=0;e{if(e=this.querySelector("template"),!e)throw new Error("dom-bind requires a