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(;p ${0} ${0} ${0} ${0} Add a header to the HTTP request. Add a header to the HTTP request. "+e+"this._clearSearchText()),1e3)}_clearSearchText(){this._searchText=""}_resetTabindices(){const e=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem,t=this.useAriaSelected;this.items.forEach((i=>{if(i.setAttribute("tabindex",i===e?"0":"-1"),t){const e=this._selection.isSelected(i);i.setAttribute("aria-selected",String(e))}}))}select(e){const t=this._valueToItem(e);t&&t.hasAttribute("disabled")||(this._focusedItem=t,super.select(e))}focusPrevious(){const{length:e}=this.items,t=Number(this.indexOf(this.focusedItem));for(let i=1;ie)`
+ `),this.styles)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","option"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),super.connectedCallback&&super.connectedCallback()}}window.customElements.define("anypoint-item",md);let yd,gd,fd=e=>e;window.customElements.define("anypoint-item-body",class extends se{get styles(){return te(yd||(yd=fd`:host{overflow:hidden;flex-direction:column;display:flex;justify-content:center;flex:1;flex-basis:.000000001px}:host([twoline]){min-height:var(--anypoint-item-body-two-line-min-height,72px)}:host([threeline]){min-height:var(--anypoint-item-body-three-line-min-height,88px)}:host>::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host>::slotted([data-secondary]),:host>::slotted([secondary]){font-size:var(--font-body-font-size);letter-spacing:var(--font-body-letter-spacing);font-weight:var(--font-body-font-weight);color:var(--anypoint-item-body-secondary-color,var(--secondary-text-color));margin-top:4px}.anypoint-item[compatibility]:hover>[data-secondary],.anypoint-item[compatibility]:hover>[secondary],:host([compatibility]:hover)>::slotted([data-secondary]),:host([compatibility]:hover)>::slotted([secondary]){color:var(--anypoint-item-secondary-focus-color,var(--anypoint-item-focus-color,var(--anypoint-color-coreBlue3)));border-left-color:var(--anypoint-item-border-left-hover-color,var(--anypoint-color-coreBlue3));border-right-color:var(--anypoint-item-border-right-hover-color,var(--anypoint-color-coreBlue3))}`))}static get properties(){return{compatibility:{type:Boolean,reflect:!0},legacy:{type:Boolean},twoLine:{type:Boolean,reflect:!0},threeLine:{type:Boolean,reflect:!0}}}get legacy(){return this.compatibility}set legacy(e){this.compatibility=e}render(){return D(gd||(gd=fd`this._clearSearchText()),1e3)}_clearSearchText(){this._searchText=""}_resetTabindices(){const e=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem,t=this.useAriaSelected;this.items.forEach((i=>{if(i.setAttribute("tabindex",i===e?"0":"-1"),t){const e=this._selection.isSelected(i);i.setAttribute("aria-selected",String(e))}}))}select(e){const t=this._valueToItem(e);t&&t.hasAttribute("disabled")||(this._focusedItem=t,super.select(e))}focusPrevious(){const{length:e}=this.items,t=Number(this.indexOf(this.focusedItem));for(let i=1;ie)`
{i[t]?i[t]+=`, ${e}`:i[t]=e})),Object.keys(i).map((e=>{let t=i[e];return t&&-1!==t.indexOf(",")&&(t=t.split(",").map((e=>e.trim())).join(", ")),{name:e,value:t}}))}(e)}function Vm(e){if("string"==typeof e)return e;let t=e;return Array.isArray(t)||(t=Bm(t)),0===t.length?"":(t=function(e){const t={};e.forEach((e=>{e.name in t?e.value&&(t[e.name]+=`, ${e.value}`):t[e.name]=e.value}));const i=[];return Object.keys(t).forEach((e=>{i[i.length]={name:e,value:t[e]}})),i}(t),t.map((e=>function(e){const t=e.name;let i;i=Array.isArray(e.value)?e.value.join(","):e.value;let s="";return t&&""!==t.trim()&&(s+=`${t}: `,i&&(s+=i)),s}(e))).join("\n"))}function Fm(e){let t=e;if("string"!=typeof t&&(t=Vm(t)),t=t.trim(),""===t)return null;const i=t.match(/^content-type:\s?(.*)$/im);if(!i)return null;let s=i[1].trim();if(-1===s.indexOf("multipart")){const e=s.indexOf("; ");e>0&&(s=s.substr(0,e))}return s}function jm(e,t,i){let s=e,n="headers";Array.isArray(s)?n="array":"string"==typeof s&&(n="string"),"array"!==n&&(s=Bm(s));const a=t.toLowerCase();let r=!1;if(s.forEach((e=>{e.name.toLowerCase()===a&&(e.value=i,r=!0)})),r||s.push({name:t,value:i}),"array"===n)return s;if("string"===n)return Vm(s);const o={};return s.forEach((e=>{o[e.name]=e.value})),new Headers(o)}jn({is:"iron-meta",properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(e,t,i){var s=new Dm({type:e,key:t});return void 0!==i&&i!==s.value?s.value=i:this.value!==s.value&&(this.value=s.value),s},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(e){e&&(this.value=this)},byKey:function(e){return new Dm({type:this.type,key:e}).value}}),window&&(window.forceJURL=!0);class Km extends(Ba(se)){get lastIssuedToken(){return this._lastIssuedToken}set lastIssuedToken(e){this._lastIssuedToken!==e&&(this._lastIssuedToken=e,this.dispatchEvent(new CustomEvent("last-issued-token-changed",{detail:{value:e}})))}static get properties(){return{proxy:{type:String},lastIssuedToken:{type:Object},requestTokenUri:{type:String},accessTokenUri:{type:String},consumerKey:{type:String},consumerSecret:{type:String},signatureMethod:{type:String},authParamsLocation:{type:String},_caseMap:{type:Object},_camelRegex:{type:Object},urlEncodedType:{type:String},ignoreBeforeRequest:{type:Boolean}}}constructor(){super(),this._tokenRequestedHandler=this._tokenRequestedHandler.bind(this),this._listenPopup=this._listenPopup.bind(this),this._handleRequest=this._handleRequest.bind(this),this.signatureMethod="HMAC-SHA1",this.authParamsLocation="authorization",this._caseMap={},this._camelRegex=/([A-Z])/g,this.urlEncodedType="application/x-www-form-urlencoded",this.ignoreBeforeRequest=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}_attachListeners(e){e.addEventListener("oauth1-token-requested",this._tokenRequestedHandler),e.addEventListener("before-request",this._handleRequest),window.addEventListener("message",this._listenPopup)}_detachListeners(e){e.removeEventListener("oauth1-token-requested",this._tokenRequestedHandler),e.removeEventListener("before-request",this._handleRequest),window.removeEventListener("message",this._listenPopup)}_getAuthSettings(e){if(e)return Array.isArray(e)||(e=[e]),e.find((e=>"oauth 1"===e.type))}_handleRequest(e){if(this.ignoreBeforeRequest)return;const t=e.detail,{auth:i}=t,s=this._getAuthSettings(i);if(!s)return;const{settings:n}=s;try{this._applyBeforeRequestSignature(t,n)}catch(e){console.warn("Unable to process OAuth 1 authorization",e)}}signRequest(e,t){const i=this._getAuthSettings(t);if(!i)return e;const s=i.settings||{},{token:n,tokenSecret:a}=s;return n&&a?(this._applyBeforeRequestSignature(e,s),e):e}_applyBeforeRequestSignature(e,t){if(!e||!e.method||!e.url)return;try{this._prepareOauth(t)}catch(e){return}const i=t.token||this.lastIssuedToken.oauth_token,s=t.tokenSecret||this.lastIssuedToken.oauth_token_secret;let n=e.method||"GET";n=n.toUpperCase();let a;if(-1===["GET","HEAD"].indexOf(e.method)&&e.headers&&e.payload){let t;try{t=Fm(e.headers)}catch(e){}t&&0===t.indexOf(this.urlEncodedType)&&(a=e.payload)}const r=this._prepareParameters(i,s,n,e.url,{},a);if("authorization"===this.authParamsLocation){const t=this._buildAuthorizationHeaders(r);try{e.headers=jm(e.headers,"authorization",t)}catch(e){}}else e.url=this._buildAuthorizationQueryStirng(e.url,r)}_tokenRequestedHandler(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.authorize(e.detail)}authorize(e){try{this._prepareOauth(e)}catch(e){return void this._dispatchError("Unable to authorize: "+e.message,"params-error")}this.getOAuthRequestToken().then((t=>{this.temporaryCredentials=t;const i=e.authorizationUri+"?oauth_token="+t.oauth_token;this.popupClosedProperly=void 0,this._popup=window.open(i,"api-console-oauth1"),this._popup?(this._next="exchange-token",this._popup.window.focus(),this._observePopupState()):this._dispatchError("Authorization popup is blocked","popup-blocked")})).catch((e=>{const t=e.message||"Unknown error when getting the token";this._dispatchError(t,"token-request-error")}))}_prepareOauth(e){if(e.signatureMethod){const t=e.signatureMethod;if(-1===["PLAINTEXT","HMAC-SHA1","RSA-SHA1"].indexOf(t))throw new Error("Unsupported signature method: "+t);"RSA-SHA1"===t&&(this._privateKey=e.consumerSecret),this.signatureMethod=t}e.requestTokenUri&&(this.requestTokenUri=e.requestTokenUri),e.accessTokenUri&&(this.accessTokenUri=e.accessTokenUri),e.consumerKey&&(this.consumerKey=e.consumerKey),e.consumerSecret&&(this.consumerSecret=e.consumerSecret),e.redirectUri&&(this._authorizeCallback=e.redirectUri),e.authParamsLocation?this.authParamsLocation=e.authParamsLocation:this.authParamsLocation="authorization",e.authTokenMethod?this.authTokenMethod=e.authTokenMethod:this.authTokenMethod="POST",this._version=e.version||"1.0",this._nonceSize=e.nonceSize||32,this._nonce=e.nonce,this._timestamp=e.timestamp,this._headers=e.customHeaders||this._defaultHeaders(),this._oauthParameterSeperator=","}_defaultHeaders(){return{Accept:"*/*",Connection:"close","User-Agent":"Advanced REST Client authorization"}}getTimestamp(){return Math.floor((new Date).getTime()/1e3)}encodeData(e){if(!e)return"";const t=encodeURIComponent(e);return this._finishEncodeParams(t)}_finishEncodeParams(e){return e.replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}decodeData(e){return e?(e=e.replace(/\+/g," "),decodeURIComponent(e)):""}getSignature(e,t,i,s,n,a){let r,o;switch("PLAINTEXT"!==e&&(r=this.createSignatureBase(t,i,s,a)),"RSA-SHA1"!==e&&(o=this.createSignatureKey(this.consumerSecret,n)),e){case"PLAINTEXT":return this._createSignaturePlainText(o);case"RSA-SHA1":return this._createSignatureRsaSha1(r,this._privateKey);case"HMAC-SHA1":return this._createSignatureHamacSha1(r,o);default:throw new Error("Unknown signature method")}}_normalizeUrl(e){const t=new URL(e);let i="";return t.port&&("http:"===t.protocol&&"80"!==t.port||"https:"===t.protocol&&"443"!==t.port)&&(i=":"+t.port),t.pathname&&""!==t.pathname||(t.pathname="/"),t.protocol+"//"+t.hostname+i+t.pathname}_isParameterNameAnOAuthParameter(e){return!(!e||0!==e.indexOf("oauth_"))}_buildAuthorizationHeaders(e){let t="OAuth ";const i=[];return e.forEach((e=>{this._isParameterNameAnOAuthParameter(e[0])&&i.push(this.encodeData(e[0])+'="'+this.encodeData(e[1])+'"')})),t+=i.join(this._oauthParameterSeperator+" "),t}_buildFormDataParameters(e){const t=[];return e.forEach((e=>{this._isParameterNameAnOAuthParameter(e[0])&&t.push(this.encodeData(e[0])+"="+this.encodeData(e[1]))})),t.join("&")}_buildAuthorizationQueryStirng(e,t){const i=new URL(e);return t.forEach((e=>{i.searchParams.append(e[0],e[1])})),i.toString()}_makeArrayOfArgumentsHash(e){const t=[];return Object.keys(e).forEach((function(i){const s=e[i];if(Array.isArray(s))for(let e=0,n=s.length;e(Array.isArray(e)&&([e]=e),e["@id"]===t||e["@id"]===s)));return Array.isArray(n)&&([n]=n),this._resolve(n)}_computeSecurityModel(e,t){if(e&&t)return e.find((e=>e["@id"]===t))}_computeDocument(e,t){if(!e||!t)return;const i=this._getAmfKey(this.ns.schema.doc),s=this._ensureArray(e[i]);return s&&s.find((e=>e["@id"]===t))}_resolve(e){const{amf:t}=this;if("object"!=typeof e||e instanceof Array||!t||e.__apicResolved)return e;let i,s=this._getAmfKey(this.ns.aml.vocabularies.document.linkTarget),n=this._ensureArray(e[s]);if(n){const s=n[0]["@id"];if(s===e["@id"])return e.__apicResolved=!0,e;i=this._getLinkTarget(t,s)}else if(s=this._getAmfKey(this.ns.aml.vocabularies.document.referenceId),n=this._ensureArray(e[s]),n){const s=n[0]["@id"];if(s===e["@id"])return e.__apicResolved=!0,e;i=this._getReferenceId(t,s)}if(!i)return this._resolveRecursive(e),e.__apicResolved=!0,e;const a={...i};delete a["@id"];const r=a["@type"];return r&&(e["@type"]?e["@type"]=e["@type"].concat(r):e["@type"]=r,delete a["@type"]),this._mergeShapes(e,a),e.__apicResolved=!0,this._resolveRecursive(e),e}_getLinkTarget(e,t){if(!e||!t)return;let i;const s=this._computeDeclares(e);if(s&&(i=this._findById(s,t)),!i){const s=this._computeReferences(e);i=this._obtainShapeFromReferences(s,t)}return i?(i=this._resolve(i),i):void 0}_obtainShapeFromReferences(e,t){if(!Array.isArray(e)||!e.length)return;let i;for(let s=0;se;const lg=Symbol("transitionEndHandler"),cg=Symbol("updateSize"),hg=Symbol("isAttached"),dg=Symbol("updateTransition"),pg=Symbol("calcSize"),ug=Symbol("dimension"),mg=Symbol("dimensionMax"),yg=Symbol("dimensionMaxCss"),gg=Symbol("transitionEnd"),fg=Symbol("desiredSize"),bg=Symbol("transitioning"),_g=Symbol("transitioningValue"),vg=Symbol("openedChanged"),wg=Symbol("horizontalChanged"),xg=Symbol("toggleAttribute");class kg extends(Lh(se)){get styles(){return te(ag||(ag=og`:host{display:block;transition-duration:var(--anypoint-collapse-transition-duration,300ms);-webkit-transition-duration:var(--anypoint-collapse-transition-duration,300ms);overflow:visible}:host([collapse-closed]){display:none}:host(:not([collapse-opened])){overflow:hidden}`))}static get properties(){return{horizontal:{type:Boolean},opened:{type:Boolean,reflect:!0},noAnimation:{type:Boolean}}}get horizontal(){return this._horizontal}set horizontal(e){const t=this._horizontal;t!==e&&(this._horizontal=e,this[wg](),this.requestUpdate("horizontal",t))}get opened(){return this._opened}set opened(e){const t=this._opened;t!==e&&(this._opened=e,this[vg](),this.requestUpdate("opened",t))}get transitioning(){return this[bg]}get[bg](){return this[_g]||!1}set[bg](e){this[_g]!==e&&(this[_g]=e,this.dispatchEvent(new CustomEvent("transitioningchange")))}get[ug](){return this.horizontal?"width":"height"}get[mg](){return this.horizontal?"maxWidth":"maxHeight"}get[yg](){return this.horizontal?"max-width":"max-height"}get[hg](){return!!this.parentNode}constructor(){super(),this.horizontal=!1,this.opened=!1,this.noAnimation=!1,this[bg]=!1,this[fg]="",this[lg]=this[lg].bind(this)}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","group"),this.hasAttribute("aria-hidden")||this.setAttribute("aria-hidden","true"),this.addEventListener("transitionend",this[lg])}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("transitionend",this[lg])}toggle(){this.opened=!this.opened,this.dispatchEvent(new CustomEvent("openedchange"))}open(){this.opened=!0,this.dispatchEvent(new CustomEvent("openedchange"))}close(){this.opened=!1,this.dispatchEvent(new CustomEvent("openedchange"))}[cg](e,t){let i="auto"===e?"":e,s=t&&!this.noAnimation&&this[hg];if(this[fg]=i,this[dg](!1),s){const e=this[pg]();""===i&&(this.style[this[mg]]="",i=this[pg]()),this.style[this[mg]]=e,this.scrollTop=this.scrollTop,this[dg](!0),s=i!==e}this.style[this[mg]]=i,s||this[gg]()}[dg](e){this.style.transitionDuration=e&&!this.noAnimation?"":"0s"}[pg](){return`${this.getBoundingClientRect()[this[ug]]}px`}[gg](){this.style[this[mg]]=this[fg],this[xg]("collapse-closed",!this.opened),this[xg]("collapse-opened",this.opened),this[dg](!1),this.notifyResize(),this[bg]=!1}[lg](e){e.composedPath().find((e=>e===this))&&this[gg]()}[vg](){this.setAttribute("aria-hidden",String(!this.opened)),this[bg]=!0,this[xg]("collapse-closed",!1),this[xg]("collapse-opened",!1),this[cg](this.opened?"auto":"0px",!0),this.opened&&this.focus()}[xg](e,t){const i=this.hasAttribute(e);!i&&t?this.setAttribute(e,""):i&&!t&&this.removeAttribute(e)}[wg](){this.style.transitionProperty=this[yg];const e="maxWidth"===this[mg]?"maxHeight":"maxWidth";this.style[e]="",this[cg](this.opened?"auto":"0px",!1)}render(){return D(rg||(rg=og`
+ `),this.styles)}static get properties(){return{value:{type:String},required:{type:Boolean},mode:{type:String},lineSeparator:{type:String},lineNumbers:{type:Boolean},tabSize:{type:Number},smartIndent:{type:Boolean},keyMap:{type:String},lineWrapping:{type:Boolean},readonly:{type:Boolean},showCursorWhenSelecting:{type:Boolean},lineWiseCopyCut:{type:Boolean},undoDepth:{type:Number},historyEventDelay:{type:Number},autofocus:{type:Boolean},gutters:{type:Array},lint:{type:Object},_editor:{type:Object}}}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._valueChanged(e),this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:e}})))}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._modeChanged(e))}get lineSeparator(){return this._lineSeparator}set lineSeparator(e){this._lineSeparator!==e&&(this._lineSeparator=e,this.setOption("lineSeparator",e))}get lineNumbers(){return this._lineNumbers}set lineNumbers(e){this._lineNumbers!==e&&(this._lineNumbers=e,this.setOption("lineNumbers",e))}get tabSize(){return this._tabSize}set tabSize(e){this._tabSize!==e&&(this._tabSize=e,this.setOption("tabSize",e))}get smartIndent(){return this._smartIndent}set smartIndent(e){this._smartIndent!==e&&(this._smartIndent=e,this.setOption("smartIndent",e))}get keyMap(){return this._keyMap}set keyMap(e){this._keyMap!==e&&(this._keyMap=e,this.setOption("keyMap",e))}get lineWrapping(){return this._lineWrapping}set lineWrapping(e){this._lineWrapping!==e&&(this._lineWrapping=e,this.setOption("lineWrapping",e))}get readonly(){return this._readOnly}set readonly(e){this._readOnly!==e&&(this._readOnly=e,this.setOption("readOnly",e))}get showCursorWhenSelecting(){return this._showCursorWhenSelecting}set showCursorWhenSelecting(e){this._showCursorWhenSelecting!==e&&(this._showCursorWhenSelecting=e,this.setOption("showCursorWhenSelecting",e))}get lineWiseCopyCut(){return this._lineWiseCopyCut}set lineWiseCopyCut(e){this._lineWiseCopyCut!==e&&(this._lineWiseCopyCut=e,this.setOption("lineWiseCopyCut",e))}get undoDepth(){return this._undoDepth}set undoDepth(e){this._undoDepth!==e&&(this._undoDepth=e,this.setOption("undoDepth",e))}get historyEventDelay(){return this._historyEventDelay}set historyEventDelay(e){this._historyEventDelay!==e&&(this._historyEventDelay=e,this.setOption("historyEventDelay",e))}get autofocus(){return this._autofocus}set autofocus(e){this._autofocus!==e&&(this._autofocus=e,this.setOption("autofocus",e))}get gutters(){return this._gutters}set gutters(e){this._gutters!==e&&(this._gutters=e,this.setOption("gutters",e))}get lint(){return this._lint}set lint(e){this._lint!==e&&(this._lint=e,this.setOption("lint",e))}get editor(){return this._editor}constructor(){super(),this._onChangeHandler=this._onChangeHandler.bind(this),this._onBeforeChangeHandler=this._onBeforeChangeHandler.bind(this),this._pendingOptions=[],this.mode={name:"javascript",json:!0}}firstUpdated(){this.value||(this.value=this._unindent(this._getContentValue()||"")),this._initializeEditor()}_initializeEditor(){try{const e=this.shadowRoot.querySelector(".wrapper"),t=CodeMirror(e,{value:this.value,mode:this.mode});this._editor=t,setTimeout((()=>this._setPendingOptions())),t.getInputField().setAttribute("aria-label","Input field"),t.setOption("extraKeys",{Tab:()=>{this.blur()}}),t.on("hintSelected",(()=>{setTimeout((()=>{this.dispatchEvent(new Event("input"))}))})),this._connectEditor()}catch(e){}}_getContentValue(){const e=this.shadowRoot.querySelector(".content slot").assignedNodes().find((e=>{const t=e.textContent;return!(!t||!t.trim())}));return e&&e.textContent||""}_unindent(e){if(!e)return e;const t=e.replace(/\t/g," ").split("\n"),i=t.reduce(((e,t)=>{if(/^\s*$/.test(t))return e;const i=t.match(/^(\s*)/)[0].length;return null===e||i{i[t]?i[t]+=`, ${e}`:i[t]=e})),Object.keys(i).map((e=>{let t=i[e];return t&&-1!==t.indexOf(",")&&(t=t.split(",").map((e=>e.trim())).join(", ")),{name:e,value:t}}))}(e)}function Vm(e){if("string"==typeof e)return e;let t=e;return Array.isArray(t)||(t=Bm(t)),0===t.length?"":(t=function(e){const t={};e.forEach((e=>{e.name in t?e.value&&(t[e.name]+=`, ${e.value}`):t[e.name]=e.value}));const i=[];return Object.keys(t).forEach((e=>{i[i.length]={name:e,value:t[e]}})),i}(t),t.map((e=>function(e){const t=e.name;let i;i=Array.isArray(e.value)?e.value.join(","):e.value;let s="";return t&&""!==t.trim()&&(s+=`${t}: `,i&&(s+=i)),s}(e))).join("\n"))}function Fm(e){let t=e;if("string"!=typeof t&&(t=Vm(t)),t=t.trim(),""===t)return null;const i=t.match(/^content-type:\s?(.*)$/im);if(!i)return null;let s=i[1].trim();if(-1===s.indexOf("multipart")){const e=s.indexOf("; ");e>0&&(s=s.substr(0,e))}return s}function jm(e,t,i){let s=e,n="headers";Array.isArray(s)?n="array":"string"==typeof s&&(n="string"),"array"!==n&&(s=Bm(s));const a=t.toLowerCase();let r=!1;if(s.forEach((e=>{e.name.toLowerCase()===a&&(e.value=i,r=!0)})),r||s.push({name:t,value:i}),"array"===n)return s;if("string"===n)return Vm(s);const o={};return s.forEach((e=>{o[e.name]=e.value})),new Headers(o)}jn({is:"iron-meta",properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(e,t,i){var s=new Dm({type:e,key:t});return void 0!==i&&i!==s.value?s.value=i:this.value!==s.value&&(this.value=s.value),s},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(e){e&&(this.value=this)},byKey:function(e){return new Dm({type:this.type,key:e}).value}}),window&&(window.forceJURL=!0);class Km extends(Ba(se)){get lastIssuedToken(){return this._lastIssuedToken}set lastIssuedToken(e){this._lastIssuedToken!==e&&(this._lastIssuedToken=e,this.dispatchEvent(new CustomEvent("last-issued-token-changed",{detail:{value:e}})))}static get properties(){return{proxy:{type:String},lastIssuedToken:{type:Object},requestTokenUri:{type:String},accessTokenUri:{type:String},consumerKey:{type:String},consumerSecret:{type:String},signatureMethod:{type:String},authParamsLocation:{type:String},_caseMap:{type:Object},_camelRegex:{type:Object},urlEncodedType:{type:String},ignoreBeforeRequest:{type:Boolean}}}constructor(){super(),this._tokenRequestedHandler=this._tokenRequestedHandler.bind(this),this._listenPopup=this._listenPopup.bind(this),this._handleRequest=this._handleRequest.bind(this),this.signatureMethod="HMAC-SHA1",this.authParamsLocation="authorization",this._caseMap={},this._camelRegex=/([A-Z])/g,this.urlEncodedType="application/x-www-form-urlencoded",this.ignoreBeforeRequest=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}_attachListeners(e){e.addEventListener("oauth1-token-requested",this._tokenRequestedHandler),e.addEventListener("before-request",this._handleRequest),window.addEventListener("message",this._listenPopup)}_detachListeners(e){e.removeEventListener("oauth1-token-requested",this._tokenRequestedHandler),e.removeEventListener("before-request",this._handleRequest),window.removeEventListener("message",this._listenPopup)}_getAuthSettings(e){if(e)return Array.isArray(e)||(e=[e]),e.find((e=>"oauth 1"===e.type))}_handleRequest(e){if(this.ignoreBeforeRequest)return;const t=e.detail,{auth:i}=t,s=this._getAuthSettings(i);if(!s)return;const{settings:n}=s;try{this._applyBeforeRequestSignature(t,n)}catch(e){console.warn("Unable to process OAuth 1 authorization",e)}}signRequest(e,t){const i=this._getAuthSettings(t);if(!i)return e;const s=i.settings||{},{token:n,tokenSecret:a}=s;return n&&a?(this._applyBeforeRequestSignature(e,s),e):e}_applyBeforeRequestSignature(e,t){if(!e||!e.method||!e.url)return;try{this._prepareOauth(t)}catch(e){return}const i=t.token||this.lastIssuedToken.oauth_token,s=t.tokenSecret||this.lastIssuedToken.oauth_token_secret;let n=e.method||"GET";n=n.toUpperCase();let a;if(-1===["GET","HEAD"].indexOf(e.method)&&e.headers&&e.payload){let t;try{t=Fm(e.headers)}catch(e){}t&&0===t.indexOf(this.urlEncodedType)&&(a=e.payload)}const r=this._prepareParameters(i,s,n,e.url,{},a);if("authorization"===this.authParamsLocation){const t=this._buildAuthorizationHeaders(r);try{e.headers=jm(e.headers,"authorization",t)}catch(e){}}else e.url=this._buildAuthorizationQueryStirng(e.url,r)}_tokenRequestedHandler(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.authorize(e.detail)}authorize(e){try{this._prepareOauth(e)}catch(e){return void this._dispatchError("Unable to authorize: "+e.message,"params-error")}this.getOAuthRequestToken().then((t=>{this.temporaryCredentials=t;const i=e.authorizationUri+"?oauth_token="+t.oauth_token;this.popupClosedProperly=void 0,this._popup=window.open(i,"api-console-oauth1"),this._popup?(this._next="exchange-token",this._popup.window.focus(),this._observePopupState()):this._dispatchError("Authorization popup is blocked","popup-blocked")})).catch((e=>{const t=e.message||"Unknown error when getting the token";this._dispatchError(t,"token-request-error")}))}_prepareOauth(e){if(e.signatureMethod){const t=e.signatureMethod;if(-1===["PLAINTEXT","HMAC-SHA1","RSA-SHA1"].indexOf(t))throw new Error("Unsupported signature method: "+t);"RSA-SHA1"===t&&(this._privateKey=e.consumerSecret),this.signatureMethod=t}e.requestTokenUri&&(this.requestTokenUri=e.requestTokenUri),e.accessTokenUri&&(this.accessTokenUri=e.accessTokenUri),e.consumerKey&&(this.consumerKey=e.consumerKey),e.consumerSecret&&(this.consumerSecret=e.consumerSecret),e.redirectUri&&(this._authorizeCallback=e.redirectUri),e.authParamsLocation?this.authParamsLocation=e.authParamsLocation:this.authParamsLocation="authorization",e.authTokenMethod?this.authTokenMethod=e.authTokenMethod:this.authTokenMethod="POST",this._version=e.version||"1.0",this._nonceSize=e.nonceSize||32,this._nonce=e.nonce,this._timestamp=e.timestamp,this._headers=e.customHeaders||this._defaultHeaders(),this._oauthParameterSeperator=","}_defaultHeaders(){return{Accept:"*/*",Connection:"close","User-Agent":"Advanced REST Client authorization"}}getTimestamp(){return Math.floor((new Date).getTime()/1e3)}encodeData(e){if(!e)return"";const t=encodeURIComponent(e);return this._finishEncodeParams(t)}_finishEncodeParams(e){return e.replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}decodeData(e){return e?(e=e.replace(/\+/g," "),decodeURIComponent(e)):""}getSignature(e,t,i,s,n,a){let r,o;switch("PLAINTEXT"!==e&&(r=this.createSignatureBase(t,i,s,a)),"RSA-SHA1"!==e&&(o=this.createSignatureKey(this.consumerSecret,n)),e){case"PLAINTEXT":return this._createSignaturePlainText(o);case"RSA-SHA1":return this._createSignatureRsaSha1(r,this._privateKey);case"HMAC-SHA1":return this._createSignatureHamacSha1(r,o);default:throw new Error("Unknown signature method")}}_normalizeUrl(e){const t=new URL(e);let i="";return t.port&&("http:"===t.protocol&&"80"!==t.port||"https:"===t.protocol&&"443"!==t.port)&&(i=":"+t.port),t.pathname&&""!==t.pathname||(t.pathname="/"),t.protocol+"//"+t.hostname+i+t.pathname}_isParameterNameAnOAuthParameter(e){return!(!e||0!==e.indexOf("oauth_"))}_buildAuthorizationHeaders(e){let t="OAuth ";const i=[];return e.forEach((e=>{this._isParameterNameAnOAuthParameter(e[0])&&i.push(this.encodeData(e[0])+'="'+this.encodeData(e[1])+'"')})),t+=i.join(this._oauthParameterSeperator+" "),t}_buildFormDataParameters(e){const t=[];return e.forEach((e=>{this._isParameterNameAnOAuthParameter(e[0])&&t.push(this.encodeData(e[0])+"="+this.encodeData(e[1]))})),t.join("&")}_buildAuthorizationQueryStirng(e,t){const i=new URL(e);return t.forEach((e=>{i.searchParams.append(e[0],e[1])})),i.toString()}_makeArrayOfArgumentsHash(e){const t=[];return Object.keys(e).forEach((function(i){const s=e[i];if(Array.isArray(s))for(let e=0,n=s.length;e(Array.isArray(e)&&([e]=e),e["@id"]===t||e["@id"]===s)));return Array.isArray(n)&&([n]=n),this._resolve(n)}_computeSecurityModel(e,t){if(e&&t)return e.find((e=>e["@id"]===t))}_computeDocument(e,t){if(!e||!t)return;const i=this._getAmfKey(this.ns.schema.doc),s=this._ensureArray(e[i]);return s&&s.find((e=>e["@id"]===t))}_resolve(e){const{amf:t}=this;if("object"!=typeof e||e instanceof Array||!t||e.__apicResolved)return e;let i,s=this._getAmfKey(this.ns.aml.vocabularies.document.linkTarget),n=this._ensureArray(e[s]);if(n){const s=n[0]["@id"];if(s===e["@id"])return e.__apicResolved=!0,e;i=this._getLinkTarget(t,s)}else if(s=this._getAmfKey(this.ns.aml.vocabularies.document.referenceId),n=this._ensureArray(e[s]),n){const s=n[0]["@id"];if(s===e["@id"])return e.__apicResolved=!0,e;i=this._getReferenceId(t,s)}if(!i)return this._resolveRecursive(e),e.__apicResolved=!0,e;const a={...i};delete a["@id"];const r=a["@type"];return r&&(e["@type"]?e["@type"]=e["@type"].concat(r):e["@type"]=r,delete a["@type"]),this._mergeShapes(e,a),e.__apicResolved=!0,this._resolveRecursive(e),e}_getLinkTarget(e,t){if(!e||!t)return;let i;const s=this._computeDeclares(e);if(s&&(i=this._findById(s,t)),!i){const s=this._computeReferences(e);i=this._obtainShapeFromReferences(s,t)}return i?(i=this._resolve(i),i):void 0}_obtainShapeFromReferences(e,t){if(!Array.isArray(e)||!e.length)return;let i;for(let s=0;se;const lg=Symbol("transitionEndHandler"),cg=Symbol("updateSize"),hg=Symbol("isAttached"),dg=Symbol("updateTransition"),pg=Symbol("calcSize"),ug=Symbol("dimension"),mg=Symbol("dimensionMax"),yg=Symbol("dimensionMaxCss"),gg=Symbol("transitionEnd"),fg=Symbol("desiredSize"),bg=Symbol("transitioning"),_g=Symbol("transitioningValue"),vg=Symbol("openedChanged"),wg=Symbol("horizontalChanged"),xg=Symbol("toggleAttribute");class kg extends(Lh(se)){get styles(){return te(ag||(ag=og`:host{display:block;transition-duration:var(--anypoint-collapse-transition-duration,300ms);-webkit-transition-duration:var(--anypoint-collapse-transition-duration,300ms);overflow:visible}:host([collapse-closed]){display:none}:host(:not([collapse-opened])){overflow:hidden}`))}static get properties(){return{horizontal:{type:Boolean},opened:{type:Boolean,reflect:!0},noAnimation:{type:Boolean}}}get horizontal(){return this._horizontal}set horizontal(e){const t=this._horizontal;t!==e&&(this._horizontal=e,this[wg](),this.requestUpdate("horizontal",t))}get opened(){return this._opened}set opened(e){const t=this._opened;t!==e&&(this._opened=e,this[vg](),this.requestUpdate("opened",t))}get transitioning(){return this[bg]}get[bg](){return this[_g]||!1}set[bg](e){this[_g]!==e&&(this[_g]=e,this.dispatchEvent(new CustomEvent("transitioningchange")))}get[ug](){return this.horizontal?"width":"height"}get[mg](){return this.horizontal?"maxWidth":"maxHeight"}get[yg](){return this.horizontal?"max-width":"max-height"}get[hg](){return!!this.parentNode}constructor(){super(),this.horizontal=!1,this.opened=!1,this.noAnimation=!1,this[bg]=!1,this[fg]="",this[lg]=this[lg].bind(this)}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","group"),this.hasAttribute("aria-hidden")||this.setAttribute("aria-hidden","true"),this.addEventListener("transitionend",this[lg])}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("transitionend",this[lg])}toggle(){this.opened=!this.opened,this.dispatchEvent(new CustomEvent("openedchange"))}open(){this.opened=!0,this.dispatchEvent(new CustomEvent("openedchange"))}close(){this.opened=!1,this.dispatchEvent(new CustomEvent("openedchange"))}[cg](e,t){let i="auto"===e?"":e,s=t&&!this.noAnimation&&this[hg];if(this[fg]=i,this[dg](!1),s){const e=this[pg]();""===i&&(this.style[this[mg]]="",i=this[pg]()),this.style[this[mg]]=e,this.scrollTop=this.scrollTop,this[dg](!0),s=i!==e}this.style[this[mg]]=i,s||this[gg]()}[dg](e){this.style.transitionDuration=e&&!this.noAnimation?"":"0s"}[pg](){return`${this.getBoundingClientRect()[this[ug]]}px`}[gg](){this.style[this[mg]]=this[fg],this[xg]("collapse-closed",!this.opened),this[xg]("collapse-opened",this.opened),this[dg](!1),this.notifyResize(),this[bg]=!1}[lg](e){e.composedPath().find((e=>e===this))&&this[gg]()}[vg](){this.setAttribute("aria-hidden",String(!this.opened)),this[bg]=!0,this[xg]("collapse-closed",!1),this[xg]("collapse-opened",!1),this[cg](this.opened?"auto":"0px",!0),this.opened&&this.focus()}[xg](e,t){const i=this.hasAttribute(e);!i&&t?this.setAttribute(e,""):i&&!t&&this.removeAttribute(e)}[wg](){this.style.transitionProperty=this[yg];const e="maxWidth"===this[mg]?"maxHeight":"maxWidth";this.style[e]="",this[cg](this.opened?"auto":"0px",!1)}render(){return D(rg||(rg=og`
closing"===d?t=t.substr(0,t.length-1)+r+"\n":t+=p+r+"\n"}return t},Hf=e=>{for(let t=0;t{let s=i[e];if(!s)return void(t[n]="");s instanceof Array&&(s=s[0]);const a=this._jsonFromStructure(s);void 0!==a&&(t[n]=a)}))}else{let e=this._computeJsonProperyValue(a);void 0===e&&(e=""),t[n]=e}}return t}_computeJsonProperyValue(e,t){return this._hasType(e,this.ns.aml.vocabularies.shapes.ScalarShape)?this._computeJsonScalarValue(e):this._hasType(e,this.ns.aml.vocabularies.shapes.UnionShape)?this._computeJsonUnionValue(e,t):this._hasType(e,this.ns.w3.shacl.NodeShape)?this._computeJsonObjectValue(e):this._hasType(e,this.ns.aml.vocabularies.shapes.ArrayShape)?this._computeJsonArrayValue(e):this._hasType(e,this.ns.aml.vocabularies.shapes.NilShape)?null:void 0}_computeJsonScalarValue(e){const t=this._getTypeScalarValue(e);if(!t)return this._computeDefaultRangleValue(e);let i=e[this._getAmfKey(this.ns.w3.shacl.datatype)];return i?(i instanceof Array&&(i=i[0]),this._typeToValue(t,i["@id"])):t||""}_computeDefaultRangleValue(e){switch(this._computeScalarType(e)){case"Number":case"Integer":case"Long":case"Float":case"Double":return 0;case"Boolean":return!1;case"Nil":case"Null":return null;default:return""}}_typeToValue(e,t){switch(t){case this._getAmfKey(this.ns.w3.xmlSchema.boolean):case this._getAmfKey(this.ns.aml.vocabularies.shapes.boolean):case this.ns.w3.xmlSchema.boolean:case this.ns.aml.vocabularies.shapes.boolean:return void 0!==e?"true"===e:e;case this._getAmfKey(this.ns.w3.xmlSchema.nil):case this._getAmfKey(this.ns.aml.vocabularies.shapes.nil):case this.ns.w3.xmlSchema.nil:case this.ns.aml.vocabularies.shapes.nil:return null;case this._getAmfKey(this.ns.w3.xmlSchema.integer):case this._getAmfKey(this.ns.aml.vocabularies.shapes.integer):case this.ns.w3.xmlSchema.integer:case this.ns.aml.vocabularies.shapes.integer:case this.ns.w3.xmlSchema.number:case this._getAmfKey(this.ns.aml.vocabularies.shapes.number):case this.ns.aml.vocabularies.shapes.number:case this._getAmfKey(this.ns.w3.xmlSchema.long):case this.ns.w3.xmlSchema.long:case this._getAmfKey(this.ns.aml.vocabularies.shapes.long):case this.ns.aml.vocabularies.shapes.long:case this._getAmfKey(this.ns.w3.xmlSchema.double):case this.ns.w3.xmlSchema.double:case this._getAmfKey(this.ns.aml.vocabularies.shapes.double):case this.ns.aml.vocabularies.shapes.double:case this._getAmfKey(this.ns.w3.xmlSchema.float):case this.ns.w3.xmlSchema.float:case this._getAmfKey(this.ns.aml.vocabularies.shapes.float):case this.ns.aml.vocabularies.shapes.float:if(e){const t=Number(e);return Number.isNaN(t)?0:Number(e)}return 0;default:return e||""}}_computeJsonUnionValue(e,t){const i=this._getAmfKey(this.ns.aml.vocabularies.shapes.anyOf),s=this._ensureArray(e[i]);if(!s)return;const n=this._getAmfKey(this.ns.w3.shacl.property);for(let e=0,i=s.length;e{if(-1!==s.indexOf(n))return;const a=this._computeStructuredExampleValue(e[n][0]);if(t){const e=n.substr(n.indexOf("#")+1);i[e]=a}else i.push(a)})),i}_computeStructuredExampleValue(e){if(!e)return null;if("string"==typeof e)return e;if(this._hasType(e,this.ns.aml.vocabularies.data.Scalar)){const t=this._getAmfKey(this.ns.aml.vocabularies.data.value),i=this._ensureArray(e[t])[0],s=i["@value"];let n=i["@type"];if(!n){const t=this._getAmfKey(this.ns.w3.shacl.datatype);n=this._ensureArray(e[t]),n&&(n=n[0]["@id"])}switch(n){case this.ns.w3.xmlSchema.boolean:return"true"===s;case this.ns.w3.xmlSchema.integer:case this.ns.w3.xmlSchema.long:case this.ns.w3.xmlSchema.double:case this.ns.w3.xmlSchema.float:case this.ns.aml.vocabularies.shapes.number:return Number(s);default:return s}}return this._computeExampleFromStructuredValue(e)}_processDataArrayProperties(e,t,i,s){let n;n=s.endsWith("s")?s.substr(0,s.length-1):s;const a=this._getAmfKey(this.ns.w3.rdfSchema.member),r=this._ensureArray(i[a]);for(let i=0,s=r.length;i{if(0!==n.indexOf(s))return;let a=i[n];a instanceof Array&&(a=a[0]);const r=If(n);this._xmlProcessDataProperty(e,t,a,r)}))}_filterReadOnlyProperties(e){if(e)return e.filter((e=>!this._isPropertyReadOnly(e)))}_isPropertyReadOnly(e){Array.isArray(e)&&(e=e[0]);const t=e[this._getAmfKey(this.ns.aml.vocabularies.shapes.range)];return this._isReadOnly(t)}_isReadOnly(e){if(Array.isArray(e)&&(e=e[0]),!e)return!1;const t=this._getAmfKey(this.ns.aml.vocabularies.shapes.readOnly);return this._getValue(e,t)}_getTrackedValue(e){const t=this._getAmfKey(this.ns.raml.vocabularies.docSourceMaps.value);return"string"!=typeof e&&e?this._getValue(e,t)||e["@value"]:e}}const Uf=Ua((e=>class extends e{static get properties(){return{page:{type:Number},itemsPerPage:{type:Number},_oldItemsPerPage:{type:Number,attribute:"items-per-page"},paginate:{type:Boolean},outlined:{type:Boolean,reflect:!0},compatibility:{type:Boolean,reflect:!0}}}get _oldItemsPerPage(){return this.itemsPerPage}set _oldItemsPerPage(e){this.itemsPerPage=e}constructor(){super(),this.page=0,this.itemsPerPage=20,this.paginate=!1}isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isPrimitive(e){if(null===e)return!0;return-1!==["string","number","boolean","undefined"].indexOf(typeof e)}getPropertyModel(e,t){const i=this.getItemModel(t);return i.key=e,i}getItemModel(e){const t={value:e};return this.isObject(e)?t.isObject=!0:Array.isArray(e)?this.isEnum(e)?t.isEnum=!0:t.isArray=!0:t.isPrimitive=!0,t}isEnum(e){if(!e||!e.length)return!1;for(let t=0,i=e.length;te;class Yf extends(Uf(se)){get styles(){return te(Bf||(Bf=Xf`:host{display:block;--json-table-property-name-width:auto}.item{display:flex;flex-direction:row;min-height:24px;padding:8px 0;border-bottom:1px var(--json-table-item-border-bottom-color,rgba(0,0,0,.12)) solid}.item.array,.item.object{display:flex;flex-direction:column}.item:last-of-type{border-bottom:none}.property-name{color:var(--json-table-list-property-name-color,#000);word-break:break-all;margin-right:12px;padding-right:12px;white-space:normal;word-break:normal;margin:8px 12px 8px 0}.property-value{flex:1;word-wrap:normal;overflow:auto}.array .property-value,.object .property-value{overflow:visible}.object .property-value{margin-left:var(--json-table-indent-size,12px)}.array .property-name,.object .property-name{font-weight:600;width:auto;min-width:auto}json-table-array,json-table-object{overflow:auto}:host>.array>.property-name,:host>.object>.property-name{color:var(--json-table-list-property-name-color,#000)}.enum-value{display:block}.enum-value::after{content:',';color:rgba(0,0,0,.54)}.enum-value:last-of-type::after{content:''}.array-label,.object-label{color:var(--json-table-complex-name-label-color,#58595a)}`))}render(){const{_display:e,paginate:t,page:i,itemsPerPage:s,outlined:n,compatibility:a}=this;return e&&e.length?D(Vf||(Vf=Xf`
+ `),this.styles,i,s)}render(){const e=this.customList;if(!e||!e.length)return"";const t=e.map((e=>this._renderItem(e)));return D(Of||(Of=Pf`${0}`),t)}}window.customElements.define("api-annotation-document",Mf);class Rf{constructor(e){this.classes=new Set,this.changed=!1,this.element=e;const t=(e.getAttribute("class")||"").split(/\s+/);for(const e of t)this.classes.add(e)}add(e){this.classes.add(e),this.changed=!0}remove(e){this.classes.delete(e),this.changed=!0}commit(){if(this.changed){let e="";this.classes.forEach((t=>e+=t+" ")),this.element.setAttribute("class",e)}}}const zf=new WeakMap,Nf=g((e=>t=>{if(!(t instanceof $)||t instanceof M||"class"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");const{committer:i}=t,{element:s}=i;let n=zf.get(t);void 0===n&&(s.setAttribute("class",i.strings.join(" ")),zf.set(t,n=new Set));const a=s.classList||new Rf(s);n.forEach((t=>{t in e||(a.remove(t),n.delete(t))}));for(const t in e){const i=e[t];i!=n.has(t)&&(i?(a.add(t),n.add(t)):(a.remove(t),n.delete(t)))}"function"==typeof a.commit&&a.commit()})),If=e=>{let t=String(e),i=t.indexOf("#");return-1!==i?t=t.substr(i+1):(i=t.indexOf(":"),-1!==i&&(t=t.substr(i+1))),t},Lf=e=>e.replace(/[^a-zA-Z0-9-_.]/g,""),qf=e=>{let t="";const i=(e=e.replace(/(>)\s*(<)(\/*)/g,"$1\n$2$3").replace(/ *(.*) +\n/g,"$1\n").replace(/(<.+>)(.+\n)/g,"$1\n$2")).split("\n");let s=0,n="other";const a={"single->single":0,"single->closing":-2,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-2,"closing->opening":0,"closing->other":0,"opening->single":2,"opening->closing":0,"opening->opening":2,"opening->other":2,"other->single":0,"other->closing":-2,"other->opening":0,"other->other":0};for(let e=0;eclosing"===d?t=t.substr(0,t.length-1)+r+"\n":t+=p+r+"\n"}return t},Hf=e=>{for(let t=0;t{let s=i[e];if(!s)return void(t[n]="");s instanceof Array&&(s=s[0]);const a=this._jsonFromStructure(s);void 0!==a&&(t[n]=a)}))}else{let e=this._computeJsonProperyValue(a);void 0===e&&(e=""),t[n]=e}}return t}_computeJsonProperyValue(e,t){return this._hasType(e,this.ns.aml.vocabularies.shapes.ScalarShape)?this._computeJsonScalarValue(e):this._hasType(e,this.ns.aml.vocabularies.shapes.UnionShape)?this._computeJsonUnionValue(e,t):this._hasType(e,this.ns.w3.shacl.NodeShape)?this._computeJsonObjectValue(e):this._hasType(e,this.ns.aml.vocabularies.shapes.ArrayShape)?this._computeJsonArrayValue(e):this._hasType(e,this.ns.aml.vocabularies.shapes.NilShape)?null:void 0}_computeJsonScalarValue(e){const t=this._getTypeScalarValue(e);if(!t)return this._computeDefaultRangleValue(e);let i=e[this._getAmfKey(this.ns.w3.shacl.datatype)];return i?(i instanceof Array&&(i=i[0]),this._typeToValue(t,i["@id"])):t||""}_computeDefaultRangleValue(e){switch(this._computeScalarType(e)){case"Number":case"Integer":case"Long":case"Float":case"Double":return 0;case"Boolean":return!1;case"Nil":case"Null":return null;default:return""}}_typeToValue(e,t){switch(t){case this._getAmfKey(this.ns.w3.xmlSchema.boolean):case this._getAmfKey(this.ns.aml.vocabularies.shapes.boolean):case this.ns.w3.xmlSchema.boolean:case this.ns.aml.vocabularies.shapes.boolean:return void 0!==e?"true"===e:e;case this._getAmfKey(this.ns.w3.xmlSchema.nil):case this._getAmfKey(this.ns.aml.vocabularies.shapes.nil):case this.ns.w3.xmlSchema.nil:case this.ns.aml.vocabularies.shapes.nil:return null;case this._getAmfKey(this.ns.w3.xmlSchema.integer):case this._getAmfKey(this.ns.aml.vocabularies.shapes.integer):case this.ns.w3.xmlSchema.integer:case this.ns.aml.vocabularies.shapes.integer:case this.ns.w3.xmlSchema.number:case this._getAmfKey(this.ns.aml.vocabularies.shapes.number):case this.ns.aml.vocabularies.shapes.number:case this._getAmfKey(this.ns.w3.xmlSchema.long):case this.ns.w3.xmlSchema.long:case this._getAmfKey(this.ns.aml.vocabularies.shapes.long):case this.ns.aml.vocabularies.shapes.long:case this._getAmfKey(this.ns.w3.xmlSchema.double):case this.ns.w3.xmlSchema.double:case this._getAmfKey(this.ns.aml.vocabularies.shapes.double):case this.ns.aml.vocabularies.shapes.double:case this._getAmfKey(this.ns.w3.xmlSchema.float):case this.ns.w3.xmlSchema.float:case this._getAmfKey(this.ns.aml.vocabularies.shapes.float):case this.ns.aml.vocabularies.shapes.float:if(e){const t=Number(e);return Number.isNaN(t)?0:Number(e)}return 0;default:return e||""}}_computeJsonUnionValue(e,t){const i=this._getAmfKey(this.ns.aml.vocabularies.shapes.anyOf),s=this._ensureArray(e[i]);if(!s)return;const n=this._getAmfKey(this.ns.w3.shacl.property);for(let e=0,i=s.length;e{if(-1!==s.indexOf(n))return;const a=this._computeStructuredExampleValue(e[n][0]);if(t){const e=n.substr(n.indexOf("#")+1);i[e]=a}else i.push(a)})),i}_computeStructuredExampleValue(e){if(!e)return null;if("string"==typeof e)return e;if(this._hasType(e,this.ns.aml.vocabularies.data.Scalar)){const t=this._getAmfKey(this.ns.aml.vocabularies.data.value),i=this._ensureArray(e[t])[0],s=i["@value"];let n=i["@type"];if(!n){const t=this._getAmfKey(this.ns.w3.shacl.datatype);n=this._ensureArray(e[t]),n&&(n=n[0]["@id"])}switch(n){case this.ns.w3.xmlSchema.boolean:return"true"===s;case this.ns.w3.xmlSchema.integer:case this.ns.w3.xmlSchema.long:case this.ns.w3.xmlSchema.double:case this.ns.w3.xmlSchema.float:case this.ns.aml.vocabularies.shapes.number:return Number(s);default:return s}}return this._computeExampleFromStructuredValue(e)}_processDataArrayProperties(e,t,i,s){let n;n=s.endsWith("s")?s.substr(0,s.length-1):s;const a=this._getAmfKey(this.ns.w3.rdfSchema.member),r=this._ensureArray(i[a]);for(let i=0,s=r.length;i{if(0!==n.indexOf(s))return;let a=i[n];a instanceof Array&&(a=a[0]);const r=If(n);this._xmlProcessDataProperty(e,t,a,r)}))}_filterReadOnlyProperties(e){if(e)return e.filter((e=>!this._isPropertyReadOnly(e)))}_isPropertyReadOnly(e){Array.isArray(e)&&(e=e[0]);const t=e[this._getAmfKey(this.ns.aml.vocabularies.shapes.range)];return this._isReadOnly(t)}_isReadOnly(e){if(Array.isArray(e)&&(e=e[0]),!e)return!1;const t=this._getAmfKey(this.ns.aml.vocabularies.shapes.readOnly);return this._getValue(e,t)}_getTrackedValue(e){const t=this._getAmfKey(this.ns.raml.vocabularies.docSourceMaps.value);return"string"!=typeof e&&e?this._getValue(e,t)||e["@value"]:e}}const Uf=Ua((e=>class extends e{static get properties(){return{page:{type:Number},itemsPerPage:{type:Number},_oldItemsPerPage:{type:Number,attribute:"items-per-page"},paginate:{type:Boolean},outlined:{type:Boolean,reflect:!0},compatibility:{type:Boolean,reflect:!0}}}get _oldItemsPerPage(){return this.itemsPerPage}set _oldItemsPerPage(e){this.itemsPerPage=e}constructor(){super(),this.page=0,this.itemsPerPage=20,this.paginate=!1}isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isPrimitive(e){if(null===e)return!0;return-1!==["string","number","boolean","undefined"].indexOf(typeof e)}getPropertyModel(e,t){const i=this.getItemModel(t);return i.key=e,i}getItemModel(e){const t={value:e};return this.isObject(e)?t.isObject=!0:Array.isArray(e)?this.isEnum(e)?t.isEnum=!0:t.isArray=!0:t.isPrimitive=!0,t}isEnum(e){if(!e||!e.length)return!1;for(let t=0,i=e.length;te;class Yf extends(Uf(se)){get styles(){return te(Bf||(Bf=Xf`:host{display:block;--json-table-property-name-width:auto}.item{display:flex;flex-direction:row;min-height:24px;padding:8px 0;border-bottom:1px var(--json-table-item-border-bottom-color,rgba(0,0,0,.12)) solid}.item.array,.item.object{display:flex;flex-direction:column}.item:last-of-type{border-bottom:none}.property-name{color:var(--json-table-list-property-name-color,#000);word-break:break-all;margin-right:12px;padding-right:12px;white-space:normal;word-break:normal;margin:8px 12px 8px 0}.property-value{flex:1;word-wrap:normal;overflow:auto}.array .property-value,.object .property-value{overflow:visible}.object .property-value{margin-left:var(--json-table-indent-size,12px)}.array .property-name,.object .property-name{font-weight:600;width:auto;min-width:auto}json-table-array,json-table-object{overflow:auto}:host>.array>.property-name,:host>.object>.property-name{color:var(--json-table-list-property-name-color,#000)}.enum-value{display:block}.enum-value::after{content:',';color:rgba(0,0,0,.54)}.enum-value:last-of-type::after{content:''}.array-label,.object-label{color:var(--json-table-complex-name-label-color,#58595a)}`))}render(){const{_display:e,paginate:t,page:i,itemsPerPage:s,outlined:n,compatibility:a}=this;return e&&e.length?D(Vf||(Vf=Xf`
${0}`),this.styles,e.map((e=>D(Ff||(Ff=Xf`|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+i.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+i.source+")?)",n="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+i.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+i.source+")?)",n="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]
@@ -1526,7 +1526,7 @@ function e(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof do
${0}
${0}`),t)}_examplesTemplate(e){let t="content-action-button, code-content-action-button, content-action-button-disabled, ";return t+="code-content-action-button-disabled content-action-button-active, ",t+="code-content-action-button-active, code-wrapper, example-code-wrapper, markdown-html",e.map((e=>D(i_||(i_=n_` .5&&(t="x"+t.toString(16)),i+=""+t+";";return i},a.prototype.code=function(e,t,i){var s=(t||"").match(/\S*/)[0];if(this.options.highlight){var n=this.options.highlight(e,s);null!=n&&n!==e&&(i=!0,e=n)}return s?'
\n":"'+(i?e:c(e,!0))+"
"},a.prototype.blockquote=function(e){return""+(i?e:c(e,!0))+"
\n"+e+"
\n"},a.prototype.html=function(e){return e},a.prototype.heading=function(e,t,i,s){return this.options.headerIds?"
\n":"
\n"},a.prototype.list=function(e,t,i){var s=t?"ol":"ul";return"<"+s+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+""+s+">\n"},a.prototype.listitem=function(e){return"\n\n"+e+"\n"+t+"
\n"},a.prototype.tablerow=function(e){return"\n"+e+" \n"},a.prototype.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+""+i+">\n"},a.prototype.strong=function(e){return""+e+""},a.prototype.em=function(e){return""+e+""},a.prototype.codespan=function(e){return""+e+"
"},a.prototype.br=function(){return this.options.xhtml?"
":"
"},a.prototype.del=function(e){return""+e+""},a.prototype.link=function(e,t,i){if(null===(e=p(this.options.sanitize,this.options.baseUrl,e)))return i;var s='"+i+""},a.prototype.image=function(e,t,i){if(null===(e=p(this.options.sanitize,this.options.baseUrl,e)))return i;var s='":">"},a.prototype.text=function(e){return e},r.prototype.strong=r.prototype.em=r.prototype.codespan=r.prototype.del=r.prototype.text=function(e){return e},r.prototype.link=r.prototype.image=function(e,t,i){return""+i},r.prototype.br=function(){return""},o.parse=function(e,t){return new o(t).parse(e)},o.prototype.parse=function(e){this.inline=new n(e.links,this.options),this.inlineText=new n(e.links,g({},this.options,{renderer:new r})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},o.prototype.next=function(){return this.token=this.tokens.pop(),this.token},o.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},o.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},o.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,h(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,i,s,n="",a="";for(i="",e=0;e
"+c(e.message+"",!0)+"";throw e}}y.exec=y,w.options=w.setOptions=function(e){return g(w.defaults,e),w},w.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new a,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}},w.defaults=w.getDefaults(),w.Parser=o,w.parser=o.parse,w.Renderer=a,w.TextRenderer=r,w.Lexer=i,w.lexer=i.lex,w.InlineLexer=n,w.inlineLexer=n.output,w.Slugger=l,w.parse=w,"undefined"!=typeof module&&"object"==typeof exports?module.exports=w:"function"==typeof define&&define.amd?define((function(){return w})):e.marked=w}(window||("undefined"!=typeof window?window:global));var tv=Object.freeze({__proto__:null});window.marked||(window.marked=tv);let iv,sv,nv=e=>e;window.customElements.define("arc-marked",class extends se{get styles(){return te(iv||(iv=nv`:host{display:block;padding:4px}`))}static get properties(){return{markdown:{type:String},breaks:{type:Boolean},pedantic:{type:Boolean},renderer:{type:Function},sanitize:{type:Boolean},sanitizer:{type:Function},disableRemoteSanitization:{type:Boolean},smartypants:{type:Boolean}}}get markdown(){return this._markdown}set markdown(e){const t=this._markdown;t!==e&&(this._markdown=e,this.renderMarkdown(),this.requestUpdate("markdown",t))}get breaks(){return this._breaks}set breaks(e){const t=this._breaks;t!==e&&(this._breaks=e,this.renderMarkdown(),this.requestUpdate("breaks",t))}get pedantic(){return this._pedantic}set pedantic(e){const t=this._pedantic;t!==e&&(this._pedantic=e,this.renderMarkdown(),this.requestUpdate("pedantic",t))}get renderer(){return this._renderer}set renderer(e){const t=this._renderer;t!==e&&(this._renderer=e,this.renderMarkdown(),this.requestUpdate("renderer",t))}get sanitize(){return this._sanitize}set sanitize(e){const t=this._sanitize;t!==e&&(this._sanitize=e,this.renderMarkdown(),this.requestUpdate("sanitize",t))}get sanitizer(){return this._sanitizer}set sanitizer(e){const t=this._sanitizer;t!==e&&(this._sanitizer=e,this.renderMarkdown(),this.requestUpdate("sanitizer",t))}get smartypants(){return this._smartypants}set smartypants(e){const t=this._smartypants;t!==e&&(this._smartypants=e,this.renderMarkdown(),this.requestUpdate("smartypants",t))}constructor(){super(),this.breaks=!1,this.pedantic=!1,this.sanitize=!1,this.disableRemoteSanitization=!1,this.smartypants=!1}firstUpdated(){if(this._outputElement=this.outputElement,this.markdown)return void this.renderMarkdown();if(this._markdownElement=this.querySelector('[type="text/markdown"]'),!this._markdownElement)return;this._markdownElement.src&&this._request(this._markdownElement.src),""!==this._markdownElement.textContent.trim()&&(this.markdown=this._unindent(this._markdownElement.textContent));new MutationObserver(this._onScriptAttributeChanged.bind(this)).observe(this._markdownElement,{attributes:!0})}connectedCallback(){super.connectedCallback(),this._attached=!0,this._outputElement=this.outputElement,this.renderMarkdown()}disconnectedCallback(){super.disconnectedCallback(),this._attached=!1}unindent(e){return this._unindent(e)}get outputElement(){const e=this.shadowRoot.querySelector("slot");if(!e)return null;return e.assignedNodes().find((e=>1===e.nodeType&&"markdown-html"===e.getAttribute("slot")))||this.shadowRoot.querySelector("#content")}renderMarkdown(){if(!this._attached)return;if(!this._outputElement)return;if(!this.markdown)return void(this._outputElement.innerHTML="");const e=new marked.Renderer;this.renderer&&this.renderer(e);const t=this.markdown,i={renderer:e,highlight:this._highlight.bind(this),breaks:this.breaks,pedantic:this.pedantic,smartypants:this.smartypants};let s=marked(t,i);if(this.sanitize)if(this.sanitizer)s=this.sanitizer(s);else{const e=ev.sanitize(s);s="string"==typeof e?e:e.toString()}this._outputElement.innerHTML=s,this.dispatchEvent(new CustomEvent("marked-render-complete")),this.dispatchEvent(new CustomEvent("markedrendercomplete"))}_highlight(e,t){const i=new CustomEvent("syntax-highlight",{composed:!0,bubbles:!0,detail:{code:e,lang:t}});return this.dispatchEvent(i),i.detail.code||e}_unindent(e){if(!e)return e;const t=e.replace(/\t/g," ").split("\n"),i=t.reduce(((e,t)=>{if(/^\s*$/.test(t))return e;const i=t.match(/^(\s*)/)[0].length;return null===e||i
'+(i?e:c(e,!0))+"
\n":""+(i?e:c(e,!0))+"
"},a.prototype.blockquote=function(e){return"\n"+e+"\n"},a.prototype.html=function(e){return e},a.prototype.heading=function(e,t,i,s){return this.options.headerIds?"
"+e+"
\n"},a.prototype.table=function(e,t){return t&&(t=""+t+""),""+e+"
"},a.prototype.br=function(){return this.options.xhtml?""+c(e.message+"",!0)+"";throw e}}y.exec=y,w.options=w.setOptions=function(e){return g(w.defaults,e),w},w.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new a,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}},w.defaults=w.getDefaults(),w.Parser=o,w.parser=o.parse,w.Renderer=a,w.TextRenderer=r,w.Lexer=i,w.lexer=i.lex,w.InlineLexer=n,w.inlineLexer=n.output,w.Slugger=l,w.parse=w,"undefined"!=typeof module&&"object"==typeof exports?module.exports=w:"function"==typeof define&&define.amd?define((function(){return w})):e.marked=w}(window||("undefined"!=typeof window?window:global));var tv=Object.freeze({__proto__:null});window.marked||(window.marked=tv);let iv,sv,nv=e=>e;window.customElements.define("arc-marked",class extends se{get styles(){return te(iv||(iv=nv`:host{display:block;padding:4px}`))}static get properties(){return{markdown:{type:String},breaks:{type:Boolean},pedantic:{type:Boolean},renderer:{type:Function},sanitize:{type:Boolean},sanitizer:{type:Function},disableRemoteSanitization:{type:Boolean},smartypants:{type:Boolean}}}get markdown(){return this._markdown}set markdown(e){const t=this._markdown;t!==e&&(this._markdown=e,this.renderMarkdown(),this.requestUpdate("markdown",t))}get breaks(){return this._breaks}set breaks(e){const t=this._breaks;t!==e&&(this._breaks=e,this.renderMarkdown(),this.requestUpdate("breaks",t))}get pedantic(){return this._pedantic}set pedantic(e){const t=this._pedantic;t!==e&&(this._pedantic=e,this.renderMarkdown(),this.requestUpdate("pedantic",t))}get renderer(){return this._renderer}set renderer(e){const t=this._renderer;t!==e&&(this._renderer=e,this.renderMarkdown(),this.requestUpdate("renderer",t))}get sanitize(){return this._sanitize}set sanitize(e){const t=this._sanitize;t!==e&&(this._sanitize=e,this.renderMarkdown(),this.requestUpdate("sanitize",t))}get sanitizer(){return this._sanitizer}set sanitizer(e){const t=this._sanitizer;t!==e&&(this._sanitizer=e,this.renderMarkdown(),this.requestUpdate("sanitizer",t))}get smartypants(){return this._smartypants}set smartypants(e){const t=this._smartypants;t!==e&&(this._smartypants=e,this.renderMarkdown(),this.requestUpdate("smartypants",t))}constructor(){super(),this.breaks=!1,this.pedantic=!1,this.sanitize=!1,this.disableRemoteSanitization=!1,this.smartypants=!1}firstUpdated(){if(this._outputElement=this.outputElement,this.markdown)return void this.renderMarkdown();if(this._markdownElement=this.querySelector('[type="text/markdown"]'),!this._markdownElement)return;this._markdownElement.src&&this._request(this._markdownElement.src),""!==this._markdownElement.textContent.trim()&&(this.markdown=this._unindent(this._markdownElement.textContent));new MutationObserver(this._onScriptAttributeChanged.bind(this)).observe(this._markdownElement,{attributes:!0})}connectedCallback(){super.connectedCallback(),this._attached=!0,this._outputElement=this.outputElement,this.renderMarkdown()}disconnectedCallback(){super.disconnectedCallback(),this._attached=!1}unindent(e){return this._unindent(e)}get outputElement(){const e=this.shadowRoot.querySelector("slot");if(!e)return null;return e.assignedNodes().find((e=>1===e.nodeType&&"markdown-html"===e.getAttribute("slot")))||this.shadowRoot.querySelector("#content")}renderMarkdown(){if(!this._attached)return;if(!this._outputElement)return;if(!this.markdown)return void(this._outputElement.innerHTML="");const e=new marked.Renderer;this.renderer&&this.renderer(e);const t=this.markdown,i={renderer:e,highlight:this._highlight.bind(this),breaks:this.breaks,pedantic:this.pedantic,smartypants:this.smartypants};let s=marked(t,i);if(this.sanitize)if(this.sanitizer)s=this.sanitizer(s);else{const e=ev.sanitize(s);s="string"==typeof e?e:e.toString()}this._outputElement.innerHTML=s,this.dispatchEvent(new CustomEvent("marked-render-complete")),this.dispatchEvent(new CustomEvent("markedrendercomplete"))}_highlight(e,t){const i=new CustomEvent("syntax-highlight",{composed:!0,bubbles:!0,detail:{code:e,lang:t}});return this.dispatchEvent(i),i.detail.code||e}_unindent(e){if(!e)return e;const t=e.replace(/\t/g," ").split("\n"),i=t.reduce(((e,t)=>{if(/^\s*$/.test(t))return e;const i=t.match(/^(\s*)/)[0].length;return null===e||i
Properties inherited from ${0}.
`),e.label):D(Kv||(Kv=Xv`Properties defined inline.
`)),this.amf,e.type,this.narrow,this.noExamplesActions,this._renderMainExample,this.compatibility,this.mediaType,this.graph)))):""}render(){let e="content-action-button, code-content-action-button, content-action-button-disabled, ";e+="code-content-action-button-disabled content-action-button-active, ",e+="code-content-action-button-active, code-wrapper, example-code-wrapper, markdown-html";const t=this.mediaTypes||[];return D(Wv||(Wv=Xv`Any instance of data is allowed.
The API file specifies body for this request but it does not specify the data model.
Any instance of data is allowed.
The API file specifies body for this request but it does not specify the data model.
${0}
`),e):"",t?D(_k||(_k=kk`${0}
`),t):"",i?D(vk||(vk=kk`${0}
`),i):"",s&&s.length?D(wk||(wk=kk` ${0}
`),e):"",t?D(_k||(_k=kk`${0}
`),t):"",i?D(vk||(vk=kk`${0}
`),i):"",s&&s.length?D(wk||(wk=kk` ${0}
`),s):"",n?D(Xk||(Xk=yS`Operation ID: ${0}`),n):"")}_getUrlTemplate(){return D(Yk||(Yk=yS`${0}
`),s):"",n?D(Xk||(Xk=yS`Operation ID: ${0}`),n):"")}_getUrlTemplate(){return D(Yk||(Yk=yS`No headers are defined for this endpoint
`))}[Hu](e,t){return D(ZM||(ZM=sR`No headers are defined for this endpoint
`))}[Hu](e,t){return D(ZM||(ZM=sR`This endpoint does not declare body properties
`)),0!==r.length&&i?D(tN||(tN=iN`This endpoint does not declare body properties
`)),0!==r.length&&i?D(tz||(tz=iz`${0}
`),e):""}_descriptionTemplate(){const{_description:e}=this;return e?D(DU||(DU=iB`API servers
${0} ${0}
${0}${0}
`),mN(s)):"")}_licenseTemplate(){const{_licenseUrl:e,_licenseName:t}=this;if(!e||!t)return"";const i=this._sanitizeHTML(`${t}`);return D(JU||(JU=iB`${0}
${0}
`),e.path,e.id,e.name,e.path):""}_methodTemplate(e,t){return D(tB||(tB=iB` ${0} `),`${t.path}/${e.method}`,e.method,e.id,e.method)}_sanitizeHTML(e){const t=ev.sanitize(e,{ADD_ATTR:["target","href"],ALLOWED_TAGS:["a"],USE_PROFILES:{html:!0}});return"string"==typeof t?t:t.toString()}}window.customElements.define("api-summary",sB);let nB,aB,rB,oB,lB,cB,hB,dB,pB,uB,mB=e=>e;class yB extends(Ba(ig(se))){get styles(){return te(nB||(nB=mB`:host{display:block}.server-selector{margin-left:-8px}`))}static get properties(){return{selected:{type:String},selectedType:{type:String},handleNavigationEvents:{type:Boolean},baseUri:{type:String},noTryIt:{type:Boolean},narrow:{type:Boolean},inlineMethods:{type:Boolean},scrollTarget:{type:Object},redirectUri:{type:String},compatibility:{type:Boolean},graph:{type:Boolean},outlined:{type:Boolean},noUrlEditor:{type:Boolean},_viewType:{type:String},_docsModel:{type:Object},_endpoint:{type:Object},noBottomNavigation:{type:Boolean},noServerSelector:{type:Boolean},allowCustomBaseUri:{type:Boolean},serverValue:{type:String},serverType:{type:String}}}get selected(){return this._selected}set selected(e){const t=this._selected;t!==e&&(this._selected=e,this.__amfChanged(),this.requestUpdate("selected",t))}get selectedType(){return this._selectedType}set selectedType(e){this._selectedType!==e&&(this.__amfChanged(),this._selectedType=e)}get showsSelector(){const{selectedType:e,serversCount:t,allowCustomBaseUri:i}=this;return!(!e||"method"!==e&&"endpoint"!==e)&&(i||t>=2)}get effectiveBaseUri(){const{baseUri:e,serverValue:t}=this;return e||t}get inlineMethods(){return this._inlineMethods}set inlineMethods(e){this._inlineMethods!==e&&(this._inlineMethods=e,this.__amfChanged())}get handleNavigationEvents(){return this._handleNavigationEvents}set handleNavigationEvents(e){this._handleNavigationEvents!==e&&(this._handleNavigationEvents=e,this._handleNavChanged(e))}constructor(){super(),this._navigationHandler=this._navigationHandler.bind(this),this._handleServerChange=this._handleServerChange.bind(this),this.baseUri=void 0,this.narrow=!1,this.compatibility=!1,this.outlined=!1,this.graph=!1,this.noBottomNavigation=!1,this.noTryIt=!1,this.noUrlEditor=!1,this.allowCustomBaseUri=!1,this.noServerSelector=!1,this.scrollTarget=void 0,this.redirectUri=void 0}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.__eventsRegistered&&this._unregisterNavigationEvents()}__amfChanged(){this.__amfProcessingDebouncer||(this.__amfProcessingDebouncer=!0,setTimeout((()=>this._processModelChange())))}_processModelChange(){this.__amfProcessingDebouncer=!1;let{amf:e}=this;e&&(Array.isArray(e)&&([e]=e),this._hasType(e,this.ns.aml.vocabularies.document.Document)?this.__processApiSpecSelection(e):this._isLibrary(e)?this.__processLibrarySelection(e):this._isSecurityFragment(e)?this._processSecurityFragment(e):this._isDocumentationFragment(e)?this._processDocumentationFragment(e):this._isTypeFragment(e)?this._processTypeFragment(e):this._isDocumentationPartialModel(e)?this._processDocumentationPartial(e):this._isSecurityPartialModel(e)?this._processSecurityPartial(e):this._isEndpointPartialModel(e)?this._processEndpointPartial(e):this._isTypePartialModel(e)&&this._processTypePartial(e))}_registerNavigationEvents(){this.__eventsRegistered=!0,window.addEventListener("api-navigation-selection-changed",this._navigationHandler)}_unregisterNavigationEvents(){this.__eventsRegistered=!1,window.removeEventListener("api-navigation-selection-changed",this._navigationHandler)}_handleNavChanged(e){e?this._registerNavigationEvents():this._unregisterNavigationEvents()}get server(){const{serverValue:e,serverType:t,selectedType:i,endpointId:s,selected:n}=this;if(t&&"server"!==t)return null;if(-1===["method","endpoint"].indexOf(i))return null;let a,r;"method"===i?(a=s,r=n):a=n;const o=this._getServers({endpointId:a,methodId:r});return o&&o.length?!e&&o.length?o[0]:o.find((t=>this._getServerUri(t)===e)):null}_navigationHandler(e){if(!0===e.detail.passive)return;const{selected:t,type:i,endpointId:s}=e.detail;this.selected=t,this.selectedType=i,this.endpointId="method"===i?s:null,this.requestUpdate()}_handleServersCountChange(e){this.serversCount=e.detail.value}_getServerUri(e){const t=this._getAmfKey(this.ns.aml.vocabularies.core.urlTemplate);return this._getValue(e,t)}_handleServerChange(e){this.serverValue=e.detail.value,this.serverType=e.detail.type}__processApiSpecSelection(e){const{selected:t,inlineMethods:i}=this;let s,{selectedType:n}=this;if(t&&n){switch(n){case"summary":s=e;break;case"security":s=this._computeSecurityApiModel(e,t);break;case"type":s=this._computeTypeApiModel(e,t);break;case"documentation":s=this._computeDocsApiModel(e,t);break;case"endpoint":s=this._computeEndpointApiModel(e,t);break;case"method":i?(n="endpoint",s=this._computeEndpointApiMethodModel(e,t)):(s=this._computeMethodApiModel(e,t),this._endpoint=this._computeEndpointApiMethodModel(e,t));break;default:return}this._docsModel=s,this._viewType=n}}_computeSecurityApiModel(e,t){const i=this._computeDeclares(e);let s;if(i&&(s=i.find((e=>e["@id"]===t))),s)s=this._resolve(s);else{const i=this._computeReferences(e);if(i&&i.length)for(let e=0,n=i.length;e${0}
`),e):""}_descriptionTemplate(){const{_description:e}=this;return e?D(DU||(DU=iB`API servers
${0} ${0}
${0}${0}
`),mz(s)):"")}_licenseTemplate(){const{_licenseUrl:e,_licenseName:t}=this;if(!e||!t)return"";const i=this._sanitizeHTML(`${t}`);return D(JU||(JU=iB`${0}
${0}
`),e.path,e.id,e.name,e.path):""}_methodTemplate(e,t){return D(tB||(tB=iB` ${0} `),`${t.path}/${e.method}`,e.method,e.id,e.method)}_sanitizeHTML(e){const t=ev.sanitize(e,{ADD_ATTR:["target","href"],ALLOWED_TAGS:["a"],USE_PROFILES:{html:!0}});return"string"==typeof t?t:t.toString()}}window.customElements.define("api-summary",sB);let nB,aB,rB,oB,lB,cB,hB,dB,pB,uB,mB=e=>e;class yB extends(Ba(ig(se))){get styles(){return te(nB||(nB=mB`:host{display:block}.server-selector{margin-left:-8px}`))}static get properties(){return{selected:{type:String},selectedType:{type:String},handleNavigationEvents:{type:Boolean},baseUri:{type:String},noTryIt:{type:Boolean},narrow:{type:Boolean},inlineMethods:{type:Boolean},scrollTarget:{type:Object},redirectUri:{type:String},compatibility:{type:Boolean},graph:{type:Boolean},outlined:{type:Boolean},noUrlEditor:{type:Boolean},_viewType:{type:String},_docsModel:{type:Object},_endpoint:{type:Object},noBottomNavigation:{type:Boolean},noServerSelector:{type:Boolean},allowCustomBaseUri:{type:Boolean},serverValue:{type:String},serverType:{type:String}}}get selected(){return this._selected}set selected(e){const t=this._selected;t!==e&&(this._selected=e,this.__amfChanged(),this.requestUpdate("selected",t))}get selectedType(){return this._selectedType}set selectedType(e){this._selectedType!==e&&(this.__amfChanged(),this._selectedType=e)}get showsSelector(){const{selectedType:e,serversCount:t,allowCustomBaseUri:i}=this;return!(!e||"method"!==e&&"endpoint"!==e)&&(i||t>=2)}get effectiveBaseUri(){const{baseUri:e,serverValue:t}=this;return e||t}get inlineMethods(){return this._inlineMethods}set inlineMethods(e){this._inlineMethods!==e&&(this._inlineMethods=e,this.__amfChanged())}get handleNavigationEvents(){return this._handleNavigationEvents}set handleNavigationEvents(e){this._handleNavigationEvents!==e&&(this._handleNavigationEvents=e,this._handleNavChanged(e))}constructor(){super(),this._navigationHandler=this._navigationHandler.bind(this),this._handleServerChange=this._handleServerChange.bind(this),this.baseUri=void 0,this.narrow=!1,this.compatibility=!1,this.outlined=!1,this.graph=!1,this.noBottomNavigation=!1,this.noTryIt=!1,this.noUrlEditor=!1,this.allowCustomBaseUri=!1,this.noServerSelector=!1,this.scrollTarget=void 0,this.redirectUri=void 0}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.__eventsRegistered&&this._unregisterNavigationEvents()}__amfChanged(){this.__amfProcessingDebouncer||(this.__amfProcessingDebouncer=!0,setTimeout((()=>this._processModelChange())))}_processModelChange(){this.__amfProcessingDebouncer=!1;let{amf:e}=this;e&&(Array.isArray(e)&&([e]=e),this._hasType(e,this.ns.aml.vocabularies.document.Document)?this.__processApiSpecSelection(e):this._isLibrary(e)?this.__processLibrarySelection(e):this._isSecurityFragment(e)?this._processSecurityFragment(e):this._isDocumentationFragment(e)?this._processDocumentationFragment(e):this._isTypeFragment(e)?this._processTypeFragment(e):this._isDocumentationPartialModel(e)?this._processDocumentationPartial(e):this._isSecurityPartialModel(e)?this._processSecurityPartial(e):this._isEndpointPartialModel(e)?this._processEndpointPartial(e):this._isTypePartialModel(e)&&this._processTypePartial(e))}_registerNavigationEvents(){this.__eventsRegistered=!0,window.addEventListener("api-navigation-selection-changed",this._navigationHandler)}_unregisterNavigationEvents(){this.__eventsRegistered=!1,window.removeEventListener("api-navigation-selection-changed",this._navigationHandler)}_handleNavChanged(e){e?this._registerNavigationEvents():this._unregisterNavigationEvents()}get server(){const{serverValue:e,serverType:t,selectedType:i,endpointId:s,selected:n}=this;if(t&&"server"!==t)return null;if(-1===["method","endpoint"].indexOf(i))return null;let a,r;"method"===i?(a=s,r=n):a=n;const o=this._getServers({endpointId:a,methodId:r});return o&&o.length?!e&&o.length?o[0]:o.find((t=>this._getServerUri(t)===e)):null}_navigationHandler(e){if(!0===e.detail.passive)return;const{selected:t,type:i,endpointId:s}=e.detail;this.selected=t,this.selectedType=i,this.endpointId="method"===i?s:null,this.requestUpdate()}_handleServersCountChange(e){this.serversCount=e.detail.value}_getServerUri(e){const t=this._getAmfKey(this.ns.aml.vocabularies.core.urlTemplate);return this._getValue(e,t)}_handleServerChange(e){this.serverValue=e.detail.value,this.serverType=e.detail.type}__processApiSpecSelection(e){const{selected:t,inlineMethods:i}=this;let s,{selectedType:n}=this;if(t&&n){switch(n){case"summary":s=e;break;case"security":s=this._computeSecurityApiModel(e,t);break;case"type":s=this._computeTypeApiModel(e,t);break;case"documentation":s=this._computeDocsApiModel(e,t);break;case"endpoint":s=this._computeEndpointApiModel(e,t);break;case"method":i?(n="endpoint",s=this._computeEndpointApiMethodModel(e,t)):(s=this._computeMethodApiModel(e,t),this._endpoint=this._computeEndpointApiMethodModel(e,t));break;default:return}this._docsModel=s,this._viewType=n}}_computeSecurityApiModel(e,t){const i=this._computeDeclares(e);let s;if(i&&(s=i.find((e=>e["@id"]===t))),s)s=this._resolve(s);else{const i=this._computeReferences(e);if(i&&i.length)for(let e=0,n=i.length;e>>0?1:0))+tt+((G=G+$)>>>0<$>>>0?1:0),V.low=G);var J,W,q,G,X=B&H^~B&U,$=O&P^~O&_,V=k&M^k&N^M&N,Y=R&E^R&L^E&L,Z=(q=et[F]).high,Q=q.low,tt=K+((B>>>14|O<<18)^(B>>>18|O<<14)^(B<<23|O>>>9))+((q=j+((O>>>14|B<<18)^(O>>>18|B<<14)^(O<<23|B>>>9)))>>>0>>0?1:0),K=U,j=_,U=H,_=P,H=B,P=O,B=I+(tt=(tt=(tt=tt+X+((q=q+$)>>>0<$>>>0?1:0))+Z+((q=q+Q)>>>0 >>0?1:0))+z+((q=q+G)>>>0>>0?1:0))+((O=D+q|0)>>>0 >>0?1:0)|0,I=N,D=L,N=M,L=E,M=k,E=R,k=tt+(V=(J=(k>>>28|R<<4)^(k<<30|R>>>2)^(k<<25|R>>>7))+V+((G=(W=(R>>>28|k<<4)^(R<<30|k>>>2)^(R<<25|k>>>7))+Y)>>>0 >>0?1:0))+((R=q+G|0)>>>0 >>0?1:0)|0}h=n.low=h+R,n.high=c+k+(h>>>0>>0?1:0),d=r.low=d+E,r.high=f+M+(d>>>0 >>0?1:0),g=i.low=g+L,i.high=p+N+(g>>>0 >>0?1:0),v=o.low=v+D,o.high=m+I+(v>>>0 >>0?1:0),x=s.low=x+O,s.high=y+B+(x>>>0 >>0?1:0),w=a.low=w+P,a.high=b+H+(w>>>0 >>0?1:0),C=l.low=C+_,l.high=S+U+(C>>>0<_>>>0?1:0),T=u.low=T+j,u.high=A+K+(T>>>0
>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[30+(128+r>>>10<<5)]=Math.floor(n/4294967296),e[31+(128+r>>>10<<5)]=n,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32}),e.SHA512=n._createHelper(o),e.HmacSHA512=n._createHmacHelper(o)}();var dbits,b64map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64pad="=";function hex2b64(t){for(var e,n="",r=0;r+3<=t.length;r+=3)e=parseInt(t.substring(r,r+3),16),n+=b64map.charAt(e>>6)+b64map.charAt(63&e);if(r+1==t.length?(e=parseInt(t.substring(r,r+1),16),n+=b64map.charAt(e<<2)):r+2==t.length&&(e=parseInt(t.substring(r,r+2),16),n+=b64map.charAt(e>>2)+b64map.charAt((3&e)<<4)),b64pad)for(;0<(3&n.length);)n+=b64pad;return n}function b64tohex(t){for(var e,n,r="",i=0,o=0;o >2),e=3&n,1):1==i?(r+=int2char(e<<2|n>>4),e=15&n,2):2==i?(r+=int2char(e),r+=int2char(n>>2),e=3&n,3):(r+=int2char(e<<2|n>>4),r+=int2char(15&n),0));return 1==i&&(r+=int2char(e<<2)),r}function b64toBA(t){for(var e=b64tohex(t),n=new Array,r=0;2*r >15;0<=--o;){var l=32767&this[t],u=this[t++]>>15,c=a*l+u*s;i=((l=s*l+((32767&c)<<15)+n[r]+(1073741823&i))>>>30)+(c>>>15)+a*u+(i>>>30),n[r++]=1073741823&l}return i}function am3(t,e,n,r,i,o){for(var s=16383&e,a=e>>14;0<=--o;){var l=16383&this[t],u=this[t++]>>14,c=a*l+u*s;i=((l=s*l+((16383&c)<<14)+n[r]+i)>>28)+(c>>14)+a*u,n[r++]=268435455&l}return i}dbits=j_lm&&"Microsoft Internet Explorer"==navigator.appName?(BigInteger.prototype.am=am2,30):j_lm&&"Netscape"!=navigator.appName?(BigInteger.prototype.am=am1,26):(BigInteger.prototype.am=am3,28),BigInteger.prototype.DB=dbits,BigInteger.prototype.DM=(1< this.DB?(this[this.t-1]|=(s&(1< >this.DB-o):this[this.t-1]|=s< =this.DB&&(o-=this.DB))}8==n&&0!=(128&t[0])&&(this.s=-1,0 >a)&&(i=!0,o=int2char(n));0<=s;)a >(a+=this.DB-e)):(n=this[s]>>(a-=e)&r,a<=0&&(a+=this.DB,--s)),(i=0 >>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function bnBitLength(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(t,e){for(var n=this.t-1;0<=n;--n)e[n+t]=this[n];for(n=t-1;0<=n;--n)e[n]=0;e.t=this.t+t,e.s=this.s}function bnpDRShiftTo(t,e){for(var n=t;n >r|s,s=(this[a]&i)< =this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,o=(1< >r;for(var s=n+1;s >r;0 >=this.DB;if(t.t >=this.DB;r+=this.s}else{for(r+=this.s;n >=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:0 =e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}0 >this.F2:0),c=this.FV/i,h=(1< >15,this.um=(1< >15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),0<=t.compareTo(this.m)&&t.subTo(this.m,t)}function montSqrTo(t,e){t.squareTo(e),this.reduce(e)}function montMulTo(t,e,n){t.multiplyTo(e,n),this.reduce(n)}function bnpIsEven(){return 0==(0 >24}function bnShortValue(){return 0==this.t?this.s:this[0]<<16>>16}function bnpChunkSize(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function bnSigNum(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function bnpToRadix(t){if(null==t&&(t=10),0==this.signum()||t<2||36 =n&&(this.dMultiply(r),this.dAddOffset(s,0),s=o=0))}0 t&&this.subTo(BigInteger.ONE.shiftLeft(t-1),this);else{var r=new Array,n=7&t;r.length=1+(t>>3),e.nextBytes(r),0 >r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s< >(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(0>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function bnGetLowestSetBit(){for(var t=0;t =this.t?0!=this.s:0!=(this[e]&1< >=this.DB;if(t.t >=this.DB;r+=this.s}else{for(r+=this.s;n >=this.DB;r+=t.s}e.s=r<0?-1:0,0 =this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}}function NullExp(){}function nNop(t){return t}function nMulTo(t,e,n){t.multiplyTo(e,n)}function nSqrTo(t,e){t.squareTo(e)}function bnPow(t){return this.exp(t,new NullExp)}function bnpMultiplyLowerTo(t,e,n){var r,i=Math.min(this.t+t.t,e);for(n.s=0,n.t=i;02*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=nbi();return t.copyTo(e),this.reduce(e),e}function barrettRevert(t){return t}function barrettReduce(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);0<=t.compareTo(this.m);)t.subTo(this.m,t)}function barrettSqrTo(t,e){t.squareTo(e),this.reduce(e)}function barrettMulTo(t,e,n){t.multiplyTo(e,n),this.reduce(n)}function bnModPow(t,e){var n=t.bitLength(),r=nbv(1);if(n<=0)return r;var i=n<18?1:n<48?3:n<144?4:n<768?5:6,o=new(n<8?Classic:e.isEven()?Barrett:Montgomery)(e),s=new Array,a=3,l=i-1,u=(1<>n-l&u:(h=(t[d]&(1< >this.DB+n-l)),a=i;0==(1&h);)h>>=1,--a;if((n-=a)<0&&(n+=this.DB,--d),p)s[h].copyTo(r),p=!1;else{for(;1>1)>lowprimes.length&&(t=lowprimes.length);for(var i=nbi(),o=0;o >8&255,rng_pool[rng_pptr++]^=t>>16&255,rng_pool[rng_pptr++]^=t>>24&255,rng_psize<=rng_pptr&&(rng_pptr-=rng_psize)}function rng_seed_time(){rng_seed_int((new Date).getTime())}if(null==rng_pool){var rng_pool=new Array,rng_pptr=0;if(void 0!==window&&(void 0!==window.crypto||void 0!==window.msCrypto)){var crypto=window.crypto||window.msCrypto;if(crypto.getRandomValues){var ua=new Uint8Array(32);for(crypto.getRandomValues(ua),t=0;t<32;++t)rng_pool[rng_pptr++]=ua[t]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5")for(var z=window.crypto.random(32),t=0;t >>8,rng_pool[rng_pptr++]=255&t;rng_pptr=0,rng_seed_time()}function rng_get_byte(){if(null==rng_state){for(rng_seed_time(),(rng_state=prng_newstate()).init(rng_pool),rng_pptr=0;rng_pptr >6|192):(n[--e]=63&i|128,n[--e]=i>>6&63|128,n[--e]=i>>12|224)}n[--e]=0;for(var o=new SecureRandom,s=new Array;2 >24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return r}function oaep_pad(t,e,n,r){var i,o=KJUR.crypto.MessageDigest,s=KJUR.crypto.Util;if("string"==typeof(n=n||"sha1")&&(i=o.getCanonicalAlgName(n),r=o.getHashLength(i),n=function(t){return hextorstr(s.hashHex(rstrtohex(t),i))}),t.length+2*r+2>e)throw"Message too long for RSA";for(var a="",l=0;l >3);if(null==t)return null;t=this.doPublic(t);if(null==t)return null;t=t.toString(16);return 0==(1&t.length)?t:"0"+t}function RSAEncryptOAEP(t,e,n){n=oaep_pad(t,this.n.bitLength()+7>>3,e,n);if(null==n)return null;n=this.doPublic(n);if(null==n)return null;n=n.toString(16);return 0==(1&n.length)?n:"0"+n}function pkcs1unpad2(t,e){for(var n=t.toByteArray(),r=0;r =n.length)return null;for(var i="";++r >24,(16711680&i)>>16,(65280&i)>>8,255&i])),i+=1;return r}function oaep_unpad(t,e,n,r){var i,o=KJUR.crypto.MessageDigest,s=KJUR.crypto.Util;for("string"==typeof(n=n||"sha1")&&(i=o.getCanonicalAlgName(n),r=o.getHashLength(i),n=function(t){return hextorstr(s.hashHex(rstrtohex(t),i))}),t=t.toByteArray(),a=0;a >1;this.e=parseInt(e,16);for(var i=new BigInteger(e,16);;){for(;this.p=new BigInteger(t-r,1,n),0!=this.p.subtract(BigInteger.ONE).gcd(i).compareTo(BigInteger.ONE)||!this.p.isProbablePrime(10););for(;this.q=new BigInteger(r,1,n),0!=this.q.subtract(BigInteger.ONE).gcd(i).compareTo(BigInteger.ONE)||!this.q.isProbablePrime(10););this.p.compareTo(this.q)<=0&&(a=this.p,this.p=this.q,this.q=a);var o=this.p.subtract(BigInteger.ONE),s=this.q.subtract(BigInteger.ONE),a=o.multiply(s);if(0==a.gcd(i).compareTo(BigInteger.ONE)&&(this.n=this.p.multiply(this.q),this.n.bitLength()==t)){this.d=i.modInverse(a),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}this.isPrivate=!0}function RSADoPrivate(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(n)<0;)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)}function RSADecrypt(t){if(t.length!=Math.ceil(this.n.bitLength()/4))throw new Error("wrong ctext length");t=parseBigInt(t,16),t=this.doPrivate(t);return null==t?null:pkcs1unpad2(t,this.n.bitLength()+7>>3)}function RSADecryptOAEP(t,e,n){if(t.length!=Math.ceil(this.n.bitLength()/4))throw new Error("wrong ctext length");t=parseBigInt(t,16),t=this.doPrivate(t);return null==t?null:oaep_unpad(t,this.n.bitLength()+7>>3,e,n)}SecureRandom.prototype.nextBytes=rng_get_bytes,RSAKey.prototype.doPublic=RSADoPublic,RSAKey.prototype.setPublic=RSASetPublic,RSAKey.prototype.encrypt=RSAEncrypt,RSAKey.prototype.encryptOAEP=RSAEncryptOAEP,RSAKey.prototype.type="RSA",RSAKey.prototype.doPrivate=RSADoPrivate,RSAKey.prototype.setPrivate=RSASetPrivate,RSAKey.prototype.setPrivateEx=RSASetPrivateEx,RSAKey.prototype.generate=RSAGenerate,RSAKey.prototype.decrypt=RSADecrypt,RSAKey.prototype.decryptOAEP=RSADecryptOAEP,void 0!==(KJUR=void 0===KJUR||!KJUR?{}:KJUR).asn1&&KJUR.asn1||(KJUR.asn1={}),KJUR.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){t=t.toString(16);return t=t.length%2==1?"0"+t:t},this.bigIntToMinTwosComplementsHex=function(t){if("-"!=(i=t.toString(16)).substr(0,1))i.length%2==1?i="0"+i:i.match(/^[0-7]/)||(i="00"+i);else{var e=i.substr(1).length;e%2==1?e+=1:i.match(/^[0-7]/)||(e+=2);for(var n="",r=0;r =e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,n,r,i,o){o=new Date(Date.UTC(t,e-1,n,r,i,o,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},YAHOO.lang.extend(KJUR.asn1.DERAbstractTime,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractStructured=function(t){KJUR.asn1.DERAbstractString.superclass.constructor.call(this);this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},YAHOO.lang.extend(KJUR.asn1.DERAbstractStructured,KJUR.asn1.ASN1Object),KJUR.asn1.DERBoolean=function(t){KJUR.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV=0==t?"010100":"0101ff"},YAHOO.lang.extend(KJUR.asn1.DERBoolean,KJUR.asn1.ASN1Object),KJUR.asn1.DERInteger=function(t){KJUR.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){t=new BigInteger(String(t),10);this.setByBigInteger(t)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},YAHOO.lang.extend(KJUR.asn1.DERInteger,KJUR.asn1.ASN1Object),KJUR.asn1.DERBitString=function(t){var e;void 0!==t&&void 0!==t.obj&&(e=KJUR.asn1.ASN1Util.newObject(t.obj),t.hex="00"+e.getEncodedHex()),KJUR.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7 i.length&&(i=r[n]);return(t=t.replace(i,"::")).slice(1,-1)}function hextoip(t){var e="malformed hex value";if(!t.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))throw e;if(8!=t.length)return 32==t.length?hextoipv6(t):t;try{return parseInt(t.substr(0,2),16)+"."+parseInt(t.substr(2,2),16)+"."+parseInt(t.substr(4,2),16)+"."+parseInt(t.substr(6,2),16)}catch(t){throw e}}function iptohex(t){var e="malformed IP address";if(!(t=t.toLowerCase(t)).match(/^[0-9.]+$/)){if(t.match(/^[0-9a-f:]+$/)&&-1!==t.indexOf(":"))return ipv6tohex(t);throw e}var n=t.split(".");if(4!==n.length)throw e;var r="";try{for(var i=0;i<4;i++)r+=("0"+parseInt(n[i]).toString(16)).slice(-2);return r}catch(t){throw e}}function ucs2hextoutf8(t){return t.match(/.{4}/g).map(function(t){var e=parseInt(t.substr(0,2),16),t=parseInt(t.substr(2),16);if(0==e&t<128)return String.fromCharCode(t);if(e<8){var n=128|63&t;return hextoutf8((192|(7&e)<<3|(192&t)>>6).toString(16)+n.toString(16))}return n=128|(15&e)<<2|(192&t)>>6,t=128|63&t,hextoutf8((224|(240&e)>>4).toString(16)+n.toString(16)+t.toString(16))}).join("")}function encodeURIComponentAll(t){for(var e=encodeURIComponent(t),n="",r=0;r =(e=o.getChildIdx(t,e)).length?-1:o.getIdxbyList(t,e[i],n,r)},ASN1HEX.getIdxbyListEx=function(t,e,n,r){var i=ASN1HEX;if(0==n.length)return void 0!==r&&t.substr(e,2)!==r?-1:e;for(var o=n.shift(),s=i.getChildIdx(t,e),a=0,l=0;l =t.length?null:i.getTLV(t,r)},ASN1HEX.getTLVbyListEx=function(t,e,n,r){var i=ASN1HEX,r=i.getIdxbyListEx(t,e,n,r);return-1==r?null:i.getTLV(t,r)},ASN1HEX.getVbyList=function(t,e,n,r,i){var o=ASN1HEX,r=o.getIdxbyList(t,e,n,r);return-1==r||r>=t.length?null:(r=o.getV(t,r),!0===i?r.substr(2):r)},ASN1HEX.getVbyListEx=function(t,e,n,r,i){var o=ASN1HEX,r=o.getIdxbyListEx(t,e,n,r);return-1==r?null:(o=o.getV(t,r),"03"==t.substr(r,2)&&!1!==i?o.substr(2):o)},ASN1HEX.getInt=function(t,e,n){null==n&&(n=-1);try{var r=t.substr(e,2);if("02"!=r&&"03"!=r)return n;var i=ASN1HEX.getV(t,e);return"02"==r?parseInt(i,16):bitstrtoint(i)}catch(t){return n}},ASN1HEX.getOID=function(t,e,n){null==n&&(n=null);try{return"06"!=t.substr(e,2)?n:hextooid(ASN1HEX.getV(t,e))}catch(t){return n}},ASN1HEX.getOIDName=function(t,e,n){null==n&&(n=null);try{var r=ASN1HEX.getOID(t,e,n);if(r==n)return n;var i=KJUR.asn1.x509.OID.oid2name(r);return""==i?r:i}catch(t){return n}},ASN1HEX.getString=function(t,e,n){null==n&&(n=null);try{return hextorstr(ASN1HEX.getV(t,e))}catch(t){return n}},ASN1HEX.hextooidstr=function(t){function e(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t}var n=[],r=t.substr(0,2),r=parseInt(r,16);n[0]=new String(Math.floor(r/40)),n[1]=new String(r%40);for(var i=t.substr(2),o=[],s=0;s 2*i)throw new Error("L of TLV too long: idx="+e);var s=o.getVblen(t,e);if(r e.length&&(n=e.length);for(var r=0;r","i")}function o(t,e){for(var n in t)for(var r=e[n]||(e[n]=[]),i=t[n],o=i.length-1;0<=o;o--)r.unshift(i[o])}h.defineMode("htmlmixed",function(a,t){var l=h.getMode(a,{name:"xml",htmlMode:!0,multilineTagIndentFactor:t.multilineTagIndentFactor,multilineTagIndentPastTag:t.multilineTagIndentPastTag,allowMissingTagName:t.allowMissingTagName}),u={},e=t&&t.tags,n=t&&t.scriptTypes;if(o(i,u),e&&o(e,u),n)for(var r=n.length-1;0<=r;r--)u.script.unshift(["type",n[r].matches,n[r].mode]);function c(t,e){var n,o,s,r=l.token(t,e.htmlState),i=/\btag\b/.test(r);return i&&!/[<>\s\/]/.test(t.current())&&(n=e.htmlState.tagName&&e.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(n)?e.inTag=n+" ":e.inTag&&i&&/>$/.test(t.current())?(n=/^([\S]+) (.*)/.exec(e.inTag),e.inTag=null,i=">"==t.current()&&function(t,e){for(var n=0;n=e?t:new Array(e-t.length+1).join(n)+t};function bitstrtoint(t){try{var e=t.substr(0,2);if("00"==e)return parseInt(t.substr(2),16);var n=parseInt(e,16),r=t.substr(2),i=(i="0"==(i=parseInt(r,16).toString(2))?"00000000":i).slice(0,0-n);return parseInt(i,2)}catch(t){return-1}}function inttobitstr(t){var e=Number(t).toString(2),t=8-e.length%8;e+=strpad("",t=8==t?0:t,"0");e=parseInt(e,2).toString(16);return"0"+t+(e=e.length%2==1?"0"+e:e)}void 0!==(KJUR=void 0===KJUR||!KJUR?{}:KJUR).crypto&&KJUR.crypto||(KJUR.crypto={}),KJUR.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHAwithRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:CryptoJS.algo.MD5,sha1:CryptoJS.algo.SHA1,sha224:CryptoJS.algo.SHA224,sha256:CryptoJS.algo.SHA256,sha384:CryptoJS.algo.SHA384,sha512:CryptoJS.algo.SHA512,ripemd160:CryptoJS.algo.RIPEMD160},this.getDigestInfoHex=function(t,e){if(void 0===this.DIGESTINFOHEAD[e])throw"alg not supported in Util.DIGESTINFOHEAD: "+e;return this.DIGESTINFOHEAD[e]+t},this.getPaddedDigestInfoHex=function(t,e,n){var r=this.getDigestInfoHex(t,e),t=n/4;if(r.length+22>t)throw"key is too short for SigAlg: keylen="+n+","+e;for(var r="00"+r,i="",o=t-"0001".length-r.length,s=0;s >24,(16711680&i)>>16,(65280&i)>>8,255&i])))),i+=1;return r}function _rsasign_getDecryptSignatureBI(t,e,n){var r=new RSAKey;return r.setPublic(e,n),r.doPublic(t)}function _rsasign_getHexDigestInfoFromSig(t,e,n){return _rsasign_getDecryptSignatureBI(t,e,n).toString(16).replace(/^1f+00/,"")}function _rsasign_getAlgNameAndHashFromHexDisgestInfo(t){for(var e in KJUR.crypto.Util.DIGESTINFOHEAD){var n=KJUR.crypto.Util.DIGESTINFOHEAD[e],r=n.length;if(t.substring(0,r)==n)return[e,t.substring(r)]}return[]}RSAKey.prototype.sign=function(t,e){var n,t=(n=t,KJUR.crypto.Util.hashString(n,e));return this.signWithMessageHash(t,e)},RSAKey.prototype.signWithMessageHash=function(t,e){e=parseBigInt(KJUR.crypto.Util.getPaddedDigestInfoHex(t,e,this.n.bitLength()),16);return _zeroPaddingOfSignature(this.doPrivate(e).toString(16),this.n.bitLength())},RSAKey.prototype.signPSS=function(t,e,n){var r,t=(r=rstrtohex(t),KJUR.crypto.Util.hashHex(r,e));return this.signWithMessageHashPSS(t,e,n=void 0===n?-1:n)},RSAKey.prototype.signWithMessageHashPSS=function(t,e,n){function r(t){return KJUR.crypto.Util.hashHex(t,e)}var i=hextorstr(t),o=i.length,s=this.n.bitLength()-1,a=Math.ceil(s/8);if(-1===n||void 0===n)n=o;else if(-2===n)n=a-o-2;else if(n<-2)throw new Error("invalid salt length");if(a >8*a-s&255),c=0;c this.n.bitLength())return 0;e=_rsasign_getAlgNameAndHashFromHexDisgestInfo(this.doPublic(e).toString(16).replace(/^1f+00/,""));if(0==e.length)return!1;var n,r=e[0];return e[1]==(n=t,KJUR.crypto.Util.hashString(n,r))},RSAKey.prototype.verifyWithMessageHash=function(t,e){if(e.length!=Math.ceil(this.n.bitLength()/4))return!1;e=parseBigInt(e,16);if(e.bitLength()>this.n.bitLength())return 0;e=_rsasign_getAlgNameAndHashFromHexDisgestInfo(this.doPublic(e).toString(16).replace(/^1f+00/,""));if(0==e.length)return!1;e[0];return e[1]==t},RSAKey.prototype.verifyPSS=function(t,e,n,r){var i,t=(i=rstrtohex(t),KJUR.crypto.Util.hashHex(i,n));return this.verifyWithMessageHashPSS(t,e,n,r=void 0===r?-1:r)},RSAKey.prototype.verifyWithMessageHashPSS=function(t,e,n,r){if(e.length!=Math.ceil(this.n.bitLength()/4))return!1;function i(t){return KJUR.crypto.Util.hashHex(t,n)}var o=new BigInteger(e,16),s=hextorstr(t),e=s.length,t=this.n.bitLength()-1,a=Math.ceil(t/8);if(-1===r||void 0===r)r=e;else if(-2===r)r=a-e-2;else if(r<-2)throw new Error("invalid salt length");if(a >8*a-t&255;if(0!=(c.charCodeAt(0)&t))throw new Error("bits beyond keysize not zero");var h=pss_mgf1_str(o,c.length,i),f=[];for(u=0;u t[0].length)||(t=e,n=o,this.options.flex));o++);return t?((r=t[0].match(/\n.*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,i[n],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r||void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)},options:{},performAction:function(t,e,n,r){switch(n){case 0:break;case 1:return 6;case 2:return e.yytext=e.yytext.substr(1,e.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return e.lexer=t,e}();return void 0!==e&&(e.parser=t,e.parse=function(){return t.parse.apply(t,arguments)},!(e.main=function(t){if(!t[1])throw new Error("Usage: "+t[0]+" FILE");return t="undefined"!=typeof process?(!0)("fs").readFileSync((!0)("path").join(process.cwd(),t[1]),"utf8"):(!0)("file").path((!0)("file").cwd()).join(t[1]).read({charset:"utf-8"}),e.parser.parse(t)})===(!0).main&&e.main("undefined"!=typeof process?process.argv.slice(1):(!0)("system").args)),e}();!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).CodeMirror=e()}(this,function(){"use strict";var t=navigator.userAgent,e=navigator.platform,f=/gecko\/\d/i.test(t),n=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),i=/Edge\/(\d+)/.exec(t),b=n||r||i,v=b&&(n?document.documentMode||6:+(i||r)[1]),d=!i&&/WebKit\//.test(t),r=d&&/Qt\/\d+\.\d+/.test(t),o=!i&&/Chrome\//.test(t),p=/Opera\//.test(t),c=/Apple Computer/.test(navigator.vendor),s=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),u=/PhantomJS/.test(t),a=c&&(/Mobile\/\w+/.test(t)||2 e)return i;o.to==e&&(o.from!=o.to&&"before"==n?r=i:ot=i),o.from==e&&(o.from!=o.to&&"before"!=n?r=i:ot=i)}return null!=r?r:ot}var at,lt,ut,ct,ht,ft,dt,pt=(at="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",lt="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",ut=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ct=/[stwN]/,ht=/[LRr]/,ft=/[Lb1n]/,dt=/[1n]/,function(t,e){var n="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!ut.test(t))return!1;for(var r,i=t.length,o=[],s=0;s=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(e =t.first&&e n?re(n,Xt(t,n).text.length):(t=Xt(t,(n=e).line).text.length,null==(e=n.ch)||t =this.string.length},Gt.prototype.sol=function(){return this.pos==this.lineStart},Gt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Gt.prototype.next=function(){if(this.pos e},Gt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Gt.prototype.skipToEnd=function(){this.pos=this.string.length},Gt.prototype.skipTo=function(t){t=this.string.indexOf(t,this.pos);if(-1 t.options.maxHighlightLength&&Jt(t.doc.mode,r.state),o=pe(t,e,r),i&&(r.state=i),e.stateAfter=r.save(!i),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))),e.styles}function me(n,r,t){var e=n.doc,i=n.display;if(!e.mode.startState)return new de(e,!0,r);var o=function(t,e,n){for(var r,i,o=t.doc,s=n?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;se.first&&Xt(e,o-1).stateAfter,a=s?de.fromSaved(e,s,o):new de(e,qt(e.mode),o);return e.iter(o,r,function(t){ve(n,t.text,a);var e=a.line;t.stateAfter=e==r-1||e%5==0||e>=i.viewFrom&&e e.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}de.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},de.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},de.prototype.nextLine=function(){this.line++,0 t.options.maxHighlightLength?(a=!1,s&&ve(t,e,r,c.pos),c.pos=e.length,null):Se(xe(n,c,r.state,h),o);if(!h||(f=h[0].name)&&(d="m-"+(d?f+" "+d:f)),!a||u!=d){for(;l =e:s.to>e),(r=r||[]).push(new ke(a,s.from,o?null:s.to)))}return r}(n,i,t),a=function(t,e,n){var r;if(t)for(var i=0;i =e:s.to>e))&&(s.from!=e||"bookmark"!=a.type||n&&!s.marker.insertLeft)||(o=null==s.from||(a.inclusiveLeft?s.from<=e:s.from t.lastLine())return e;var n,r=Xt(t,e);if(!Fe(t,r))return e;for(;n=Pe(r);)r=n.find(1,!0).line;return Qt(r)+1}function Fe(t,e){var n=Te&&e.markedSpans;if(n)for(var r,i=0;i n.maxLineLength&&(n.maxLineLength=e,n.maxLine=t)})}var We=function(t,e,n){this.text=t,Le(this,e),this.height=n?n(this):1};We.prototype.lineNo=function(){return Qt(this)},Tt(We);var qe={},Ge={};function Xe(t,e){if(!t||/^\s*$/.test(t))return null;e=e.addModeClass?Ge:qe;return e[t]||(e[t]=t.replace(/\S+/g,"cm-$&"))}function $e(t,e){var n=k("span",null,null,d?"padding-right: .1px":null),r={pre:k("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var o=i?e.rest[i-1]:e.line,s=void 0;r.pos=0,r.addToken=Ze,function(t){if(null!=Dt)return Dt;var e=T(t,document.createTextNode("AخA")),n=I(e,0,1).getBoundingClientRect(),e=I(e,1,2).getBoundingClientRect();return A(t),n&&n.left!=n.right&&(Dt=e.right-n.right<3)}(t.display.measure)&&(s=mt(o,t.doc.direction))&&(r.addToken=function(h,f){return function(t,e,n,r,i,o,s){n=n?n+" cm-force-border":"cm-force-border";for(var a=t.pos,l=a+e.length;;){for(var u=void 0,c=0;c a&&u.from<=a);c++);if(u.to>=l)return h(t,e,n,r,i,o,s);h(t,e.slice(0,u.to-a),n,r,null,o,s),r=null,e=e.slice(u.to-a),a=u.to}}}(r.addToken,s)),r.map=[],function(t,e,n){var r=t.markedSpans,i=t.text,o=0;if(r)for(var s,a,l,u,c,h,f,d=i.length,p=0,g=1,m="",v=0;;){if(v==p){l=u=c=a="",h=f=null,v=1/0;for(var y=[],x=void 0,b=0;b p||S.collapsed&&w.to==p&&w.from==p)){if(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,u=""),S.className&&(l+=" "+S.className),S.css&&(a=(a?a+";":"")+S.css),S.startStyle&&w.from==p&&(c+=" "+S.startStyle),S.endStyle&&w.to==v&&(x=x||[]).push(S.endStyle,w.to),S.title&&((f=f||{}).title=S.title),S.attributes)for(var C in S.attributes)(f=f||{})[C]=S.attributes[C];S.collapsed&&(!h||Be(h.marker,S)<0)&&(h=w)}else w.from>p&&v>w.from&&(v=w.from)}if(x)for(var A=0;A n)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function An(t,e,n,r){return Rn(t,kn(t,e),n,r)}function Tn(t,e){if(e>=t.display.viewFrom&&e =t.lineN&&e e)&&(i=(o=l-a)-1,l<=e&&(s="right")),null!=i){if(r=t[u+2],a==l&&n==(r.insertLeft?"left":"right")&&(s=n),"left"==n&&0==i)for(;u&&t[u-2]==t[u-3]&&t[u-1].insertLeft;)r=t[2+(u-=3)],s="left";if("right"==n&&i==l-a)for(;u =i.text.length?(e=i.text.length,u="before"):e<=0&&(e=0,u="after"),!l)return a("before"==u?e-1:e,"before"==u);function c(t,e,n){return a(n?t-1:t,1==l[e].level!=n)}var h=st(l,e,u),t=ot,h=c(e,h,"before"==u);return null!=t&&(h.other=c(e,t,"before"!=u)),h}function jn(t,e){var n=0;e=ce(t.doc,e),t.options.lineWrapping||(n=Gn(t.display)*e.ch);e=Xt(t.doc,e.line),t=ze(e)+vn(t.display);return{left:n,right:n,top:t,bottom:t+e.height}}function Fn(t,e,n,r,i){n=re(t,e,n);return n.xRel=i,r&&(n.outside=r),n}function zn(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return Fn(r.first,0,null,-1,-1);var i=te(r,n),o=r.first+r.size-1;if(o=l||d.to<=a||(f=1!=d.level,f=Rn(t,r,f?Math.min(l,d.to)-1:Math.max(a,d.from)).right,f=f l&&(u={from:u.from,to:l,level:u.level});return u}:function(n,r,i,o,s,a,l){var t=it(function(t){var e=s[t],t=1!=e.level;return Wn(Kn(n,re(i,t?e.to:e.from,t?"before":"after"),"line",r,o),a,l,!0)},0,s.length-1),e=s[t];{var u;0 l&&(e=s[t-1]))}return e})(n,t,e,o,c,r,i),u=1!=d.level,a=u?d.from:d.to-1,l=u?d.to:d.from-1);var h=null,f=null,c=it(function(t){var e=Rn(n,o,t);return e.top+=s,e.bottom+=s,Wn(e,r,i,!1)&&(e.top<=i&&e.left<=r&&(h=t,f=e),1)},a,l),d=!1;{var p,g;f?(p=r-f.left =u.bottom?1:0)}return c=rt(t.text,c,1),Fn(e,c,g,d,r-p)}(t,s,i,e,n),l=function(t,e){var n,r=Te&&t.markedSpans;if(r)for(var i=0;i e)&&(!n||Be(n,o.marker)<0)&&(n=o.marker)}return n}(s,a.ch+(0 r},t,i)}}function Jn(t,e,n,r){return Vn(t,e,n=n||kn(t,e),Pn(t,e,Rn(t,n,r),"line").top)}function Wn(t,e,n,r){return!(t.bottom<=n)&&(t.top>n||(r?t.left:t.right)>e)}function qn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Mn){Mn=R("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Mn.appendChild(document.createTextNode("x")),Mn.appendChild(R("br"));Mn.appendChild(document.createTextNode("x"))}T(t.measure,Mn);var n=Mn.offsetHeight/50;return 3 =t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;r e)&&(s.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=s.viewTo?Te&&Ke(t.doc,e) s.viewFrom?rr(t):(s.viewFrom+=r,s.viewTo+=r):e<=s.viewFrom&&n>=s.viewTo?rr(t):e<=s.viewFrom?(i=ir(t,n,n+r,1))?(s.view=s.view.slice(i.index),s.viewFrom=i.lineN,s.viewTo+=r):rr(t):n>=s.viewTo?(o=ir(t,e,e,-1))?(s.view=s.view.slice(0,o.index),s.viewTo=o.lineN):rr(t):(i=ir(t,e,e,-1),o=ir(t,n,n+r,1),i&&o?(s.view=s.view.slice(0,i.index).concat(en(t,i.lineN,o.lineN)).concat(s.view.slice(o.index)),s.viewTo+=r):rr(t));t=s.externalMeasured;t&&(n =i.lineN&&e =r.viewTo||(null==(e=r.view[tr(t,e)]).node||-1==U(e=e.changes||(e.changes=[]),n)&&e.push(n))}function rr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function ir(t,e,n,r){var i,o=tr(t,e),s=t.display.view;if(!Te||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var a=t.display.viewFrom,l=0;l =t.display.viewTo||n.to().line e||e==n&&s.to==e)&&(r(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr",o),i=!0)}i||r(e,n,"ltr")}(S,g||0,null==m?x:m,function(t,e,n,r){var i,o,s,a,l="ltr"==n,u=b(t,l?"left":"right"),c=b(e-1,l?"right":"left"),h=null==g&&0==t,f=null==m&&e==x,d=0==r,p=!S||r==S.length-1;c.top-u.top<=3?(i=(T?h:f)&&d?C:(l?u:c).left,r=(T?f:h)&&p?A:(l?c:u).right,k(i,u.top,r-i,u.bottom)):(n=l?(o=T&&h&&d?C:u.left,s=T?A:w(t,n,"before"),a=T?C:w(e,n,"after"),T&&f&&p?A:c.right):(o=T?w(t,n,"before"):C,s=!T&&h&&d?A:u.right,a=!T&&f&&p?C:c.left,T?w(e,n,"after"):A),k(o,u.top,s-o,u.bottom),u.bottom t.display.sizerWidth&&((l=Math.ceil(l/Gn(t.display)))>t.display.maxLineLength&&(t.display.maxLineLength=l,t.display.maxLine=o.line,t.display.maxLineChanged=!0))}}}function mr(t){if(t.widgets)for(var e=0;e =r&&(o=te(e,ze(Xt(e,n))-t.wrapper.clientHeight),r=n)),{from:o,to:Math.max(r,o+1)}}function yr(t,e){var n=t.display,r=qn(t.display);e.top<0&&(e.top=0);var i=(t.curOp&&null!=t.curOp.scrollTop?t.curOp:n.scroller).scrollTop,o=Sn(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+yn(n),l=e.top a-r;e.topi+o&&((u=Math.min(e.top,(r?a:e.bottom)-o))!=i&&(s.scrollTop=u));var i=t.options.fixedGutter?0:n.gutters.offsetWidth,u=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-i,t=wn(t)-n.gutters.offsetWidth,n=e.right-e.left>t;return n&&(e.right=e.left+t),e.left<10?s.scrollLeft=0:e.leftt+u-3&&(s.scrollLeft=e.right+(n?0:10)-t),s}function xr(t,e){null!=e&&(Sr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc:t.curOp).scrollTop+e)}function br(t){Sr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function wr(t,e,n){null==e&&null==n||Sr(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Sr(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Cr(t,jn(t,e.from),jn(t,e.to),e.margin))}function Cr(t,e,n,r){r=yr(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-r,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+r});wr(t,r.scrollLeft,r.scrollTop)}function Ar(t,e){Math.abs(t.doc.scrollTop-e)<2||(f||Vr(t,{top:e}),Tr(t,e,!0),f&&Vr(t),_r(t,100))}function Tr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),t.display.scroller.scrollTop==e&&!n||(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function kr(t,e,n,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,qr(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Rr(t){var e=t.display,n=e.gutters.offsetWidth,r=Math.round(t.doc.height+yn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+bn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}t=function(t,e,n){this.cm=n;var r=this.vert=R("div",[R("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=R("div",[R("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,t(r),t(i),yt(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),yt(i,"scroll",function(){i.clientWidth&&e(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&v<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};t.prototype.update=function(t){var e,n=t.scrollWidth>t.clientWidth+1,r=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;return r?(this.vert.style.display="block",this.vert.style.bottom=n?i+"px":"0",e=t.viewHeight-(n?i:0),this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+e)+"px"):(this.vert.style.display="",this.vert.firstChild.style.height="0"),n?(this.horiz.style.display="block",this.horiz.style.right=r?i+"px":"0",this.horiz.style.left=t.barLeft+"px",e=t.viewWidth-t.barLeft-(r?i:0),this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+e)+"px"):(this.horiz.style.display="",this.horiz.firstChild.style.width="0"),!this.checkedZeroWidth&&0 =n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new jr(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}(e[n]);for(var r=0;r (window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null==i||u||(e=R("div","",null,"position: absolute;\n top: "+(e.top-n.viewOffset-vn(t.display))+"px;\n height: "+(e.bottom-e.top+bn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;"),t.display.lineSpace.appendChild(e),e.scrollIntoView(i),t.display.lineSpace.removeChild(e)))}(e,i))}var o=t.maybeHiddenMarkers,s=t.maybeUnhiddenMarkers;if(o)for(var a=0;a =s.display.viewTo||(a=+new Date+s.options.workTime,l=me(s,c.highlightFrontier),u=[],c.iter(l.line,Math.min(c.first+c.size,s.display.viewTo+500),function(t){if(l.line>=s.display.viewFrom){var e=t.styles,n=t.text.length>s.options.maxHighlightLength?Jt(c.mode,l.state):null,r=pe(s,t,l,!0);n&&(l.state=n),t.styles=r.styles;n=t.styleClasses,r=r.classes;r?t.styleClasses=r:n&&(t.styleClasses=null);for(var i=!e||e.length!=t.styles.length||n!=r&&(!n||!r||n.bgClass!=r.bgClass||n.textClass!=r.textClass),o=0;!i&&o a)return _r(s,s.options.workDelay),!0}),c.highlightFrontier=l.line,c.modeFrontier=Math.max(c.modeFrontier,l.line),u.length&&Or(s,function(){for(var t=0;t =n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==or(t))return!1;Gr(t)&&(rr(t),e.dims=Xn(t));var i=r.first+r.size,o=Math.max(e.visible.from-t.options.viewportMargin,r.first),s=Math.min(i,e.visible.to+t.options.viewportMargin);n.viewFrom s&&n.viewTo-s<20&&(s=Math.min(i,n.viewTo)),Te&&(o=Ke(t.doc,o),s=je(t.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;r=o,i=s,0==(s=(o=t).display).view.length||r>=s.viewTo||i<=s.viewFrom?(s.view=en(o,r,i),s.viewFrom=r):(s.viewFrom>r?s.view=en(o,r,s.viewFrom).concat(s.view):s.viewFrom i&&(s.view=s.view.slice(0,tr(o,i)))),s.viewTo=i,n.viewOffset=ze(Xt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";o=or(t);if(!a&&0==o&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;s=function(t){if(t.hasFocus())return null;var e=E();if(!e||!M(t.display.lineDiv,e))return null;var n={activeElt:e};return!window.getSelection||(e=window.getSelection()).anchorNode&&e.extend&&M(t.display.lineDiv,e.anchorNode)&&(n.anchorNode=e.anchorNode,n.anchorOffset=e.anchorOffset,n.focusNode=e.focusNode,n.focusOffset=e.focusOffset),n}(t);return 4 =t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!Fr(t,e))break;gr(t);var i=Rr(t);sr(t),Mr(t,i),Wr(t,i),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Vr(t,e){var n=new jr(t,e);Fr(t,n)&&(gr(t),zr(t,n),e=Rr(t),sr(t),Mr(t,e),Wr(t,e),n.finish())}function Jr(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function Wr(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+bn(t)+"px"}function qr(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=$n(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=r+"px",s=0;s s.clientWidth,l=s.scrollHeight>s.clientHeight;if(r&&a||i&&l){if(i&&g&&d)t:for(var u=e.target,c=o.view;u!=s;u=u.parentNode)for(var h=0;h a-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=(l=i).lastOp==r?(wi(l.done),q(l.done)):l.done.length&&!q(l.done).ranges?q(l.done):1 i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,s||wt(t,"historyAdded")}function Ci(t,e,n,r){var i,o,s,a=t.history,l=r&&r.origin;n==a.lastSelOp||l&&a.lastSelOrigin==l&&(a.lastModTime==a.lastSelTime&&a.lastOrigin==l||(i=t,o=l,s=q(a.done),t=e,"*"==(o=o.charAt(0))||"+"==o&&s.ranges.length==t.ranges.length&&s.somethingSelected()==t.somethingSelected()&&new Date-i.history.lastSelTime<=(i.cm?i.cm.options.historyEventDelay:500)))?a.done[a.done.length-1]=e:Ai(e,a.done),a.lastSelTime=+new Date,a.lastSelOrigin=l,a.lastSelOp=n,r&&!1!==r.clearRedo&&wi(a.undone)}function Ai(t,e){var n=q(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Ti(e,n,t,r){var i=n["spans_"+e.id],o=0;e.iter(Math.max(e.first,t),Math.min(e.first+e.size,r),function(t){t.markedSpans&&((i=i||(n["spans_"+e.id]={}))[o]=t.markedSpans),++o})}function ki(t,e){var n=e["spans_"+t.id];if(!n)return null;for(var r=[],i=0;i =e.ch:a.to>e.ch))){if(i&&(wt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(l.atomic){if(n){var h=l.find(r<0?1:-1),a=void 0;if((h=(r<0?c:u)?Fi(t,h,-r,h&&h.line==e.line?o:null):h)&&h.line==e.line&&(a=ie(h,n))&&(r<0?a<0:0t.first?ce(t,re(e.line-1)):null:0 t.lastLine()||(e.from.line i?{from:e.from,to:re(i,Xt(t,i).text.length),text:[e.text[0]],origin:e.origin}:e).removed=$t(t,e.from,e.to),n=n||ci(t,e),t.cm?function(t,e,n){var r=t.doc,i=t.display,o=e.from,s=e.to,a=!1,l=o.line;t.options.lineWrapping||(l=Qt(_e(Xt(r,o.line))),r.iter(l,s.line+1,function(t){if(t==i.maxLine)return a=!0}));-1 i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0));(function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&er(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ui(e.doc)),e&&sn(e,"markerCleared",e,this,r,i),n&&Br(e),this.parent&&this.parent.clear()}},so.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i =t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(i,o,s){i=ce(this,i),o=ce(this,o);var a=[],l=i.line;return this.iter(i.line,o.line+1,function(t){var e=t.markedSpans;if(e)for(var n=0;n =r.to||null==r.from&&l!=i.line||null!=r.from&&l==o.line&&r.from>=o.ch||s&&!s(r.marker)||a.push(r.marker.parent||r.marker)}++l}),a},getAllMarks:function(){var r=[];return this.iter(function(t){var e=t.markedSpans;if(e)for(var n=0;n e&&(e=t.from),null!=t.to&&t.to t.text.length?null:n}function Oo(t,e,n){t=Bo(t,e.ch,n);return null==t?null:new re(e.line,t,n<0?"after":"before")}function Ho(t,e,n,r,i){if(t){"rtl"==e.doc.direction&&(i=-i);var o=mt(n,e.doc.direction);if(o){var s,a,l,t=i<0?q(o):o[0],o=i<0==(1==t.level)?"after":"before";return 0 =n.text.length?(a.ch=n.text.length,a.sticky="before"):a.ch<=0&&(a.ch=0,a.sticky="after");var r=st(l,a.ch,a.sticky),i=l[r];if("ltr"==e.doc.direction&&i.level%2==0&&(0 a.ch:i.from =i.from&&f>=c.begin))return new re(a.line,f,h?"before":"after")}h=function(t,e,n){for(var r=function(t,e){return e?new re(a.line,u(t,1),"before"):new re(a.line,t,"after")};0<=t&&t s.doc.first&&((n=Xt(s.doc,t.line-1).text)&&(t=new re(t.line,1),s.replaceRange(e.charAt(0)+s.doc.lineSeparator()+n.charAt(n.length-1),re(t.line-1,n.length-1),t,"+transpose")))),i.push(new oi(t,t)));s.setSelections(i)})},newlineAndIndent:function(r){return Or(r,function(){for(var t=(e=r.listSelections()).length-1;0<=t;t--)r.replaceRange(r.doc.lineSeparator(),e[t].anchor,e[t].head,"+input");for(var e=r.listSelections(),n=0;n c&&e.push(new oi(re(a,c),re(a,V(u,s,n))))}e.length||e.push(new oi(d,d)),Oi(g,si(f,y.ranges.slice(0,v).concat(e),v),{origin:"*mouse",scroll:!1}),f.scrollIntoView(t)}else{var h,r=m,i=ts(f,t,p.unit),t=r.anchor,t=0 =n.to||o.line l.bottom?20:0)&&setTimeout(Hr(f,function(){u==i&&(s.scroller.scrollTop+=r,t(e))}),50))}:n)(t)}),i=Hr(f,n);f.state.selectingText=i,yt(s.wrapper.ownerDocument,"mousemove",r),yt(s.wrapper.ownerDocument,"mouseup",i)})(t,r,e,o)}(s,e,i,t):Nt(t)==a.scroller&&kt(t):2==n?(e&&Ni(s.doc,e),setTimeout(function(){return a.input.focus()},20)):3==n&&(w?s.display.input.onContextMenu(t):fr(s)))))}function ts(t,e,n){if("char"==n)return new oi(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new oi(re(e.line,0),ce(t.doc,re(e.line+1,0)));e=n(t,e);return new oi(e.from,e.to)}function es(t,e,n,r){var i,o;if(e.touches)i=e.touches[0].clientX,o=e.touches[0].clientY;else try{i=e.clientX,o=e.clientY}catch(t){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&kt(e);var s=t.display,r=s.lineDiv.getBoundingClientRect();if(o>r.bottom||!At(t,n))return Mt(e);o-=r.top-s.viewOffset;for(var a=0;a =i)return wt(t,n,t,te(t.doc,o),t.display.gutterSpecs[a].className,e),Mt(e)}}function ns(t,e){return es(t,e,"gutterClick",!0)}function rs(t,e){var n,r;mn(t.display,e)||(r=e,At(n=t,"gutterContextMenu")&&es(n,r,"gutterContextMenu",!1))||St(t,e,"contextmenu")||w||t.display.input.onContextMenu(e)}function is(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Dn(t)}Zo.prototype.compare=function(t,e,n){return this.time+400>t&&0==ie(e,this.pos)&&n==this.button};var os={toString:function(){return"CodeMirror.Init"}},ss={},as={};function ls(t,e,n){!e!=!(n&&n!=os)&&(n=t.display.dragFunctions,(e=e?yt:bt)(t.display.scroller,"dragstart",n.start),e(t.display.scroller,"dragenter",n.enter),e(t.display.scroller,"dragover",n.over),e(t.display.scroller,"dragleave",n.leave),e(t.display.scroller,"drop",n.drop))}function us(t){t.options.lineWrapping?(N(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(C(t.display.wrapper,"CodeMirror-wrap"),Je(t)),Zn(t),er(t),Dn(t),setTimeout(function(){return Mr(t)},100)}function cs(t,e){var n=this;if(!(this instanceof cs))return new cs(t,e);this.options=e=e?O(e):{},O(ss,e,!1);var r=e.value;"string"==typeof r?r=new fo(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var i,o=new cs.inputStyles[e.inputStyle](this),o=this.display=new Zr(t,r,o,e);for(i in is(o.wrapper.CodeMirror=this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Lr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new P,keySeq:null,specialChars:null},e.autofocus&&!h&&o.input.focus(),b&&v<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(r){var i=r.display;yt(i.scroller,"mousedown",Hr(r,Qo)),yt(i.scroller,"dblclick",b&&v<11?Hr(r,function(t){var e;St(r,t)||(!(e=Qn(r,t))||ns(r,t)||mn(r.display,t)||(kt(t),e=r.findWordAt(e),Ni(r.doc,e.anchor,e.head)))}):function(t){return St(r,t)||kt(t)});yt(i.scroller,"contextmenu",function(t){return rs(r,t)}),yt(i.input.getField(),"contextmenu",function(t){i.scroller.contains(t.target)||rs(r,t)});var n,o={end:0};function s(){i.activeTouch&&(n=setTimeout(function(){return i.activeTouch=null},1e3),(o=i.activeTouch).end=+new Date)}function a(t,e){if(null==e.left)return 1;var n=e.left-t.left,t=e.top-t.top;return 400 o.first?H(Xt(o,e-1).text,null,s):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n);var c=Math.max(0,c),h="",f=0;if(t.options.indentWithTabs)for(var d=Math.floor(c/s);d;--d)f+=s,h+="\t";if(f s,l=Ot(e),u=null;if(a&&1 s?"cut":"+input")};Ji(t.doc,g),sn(t,"inputRead",t,g)}e&&!a&&vs(t,e),br(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function ms(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");return n&&(t.preventDefault(),e.isReadOnly()||e.options.disableInput||Or(e,function(){return gs(e,n,0,null,"paste")}),1)}function vs(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;0<=r;r--){var i=n.ranges[r];if(!(100 =r.first+r.size||(i=new re(n,i.ch,i.sticky),!(l=Xt(r,n))))return;i=Ho(a,r.cm,l,i.line,u)}else i=e;return 1}if("char"==s||"codepoint"==s)n();else if("column"==s)n(!0);else if("word"==s||"group"==s)for(var c=null,h="group"==s,f=r.cm&&r.cm.getHelper(i,"wordChars"),d=!0;!(o<0)||n(!d);d=!1){var p=l.text.charAt(i.ch)||"\n",p=Q(p,f)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||d||p||(p="s"),c&&c!=p){o<0&&(o=1,n(),i.sticky="after");break}if(p&&(c=p),0 =a.height){s.hitSide=!0;break}o+=5*n}return s}t=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new P,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Cs(t,e){var n=Tn(t,e.line);if(!n||n.hidden)return null;var r=Xt(t.doc,e.line),n=Cn(n,r,e.line),r=mt(r,t.doc.direction),t="left";r&&(t=st(r,e.ch)%2?"right":"left");t=Nn(n.map,e.ch,t);return t.offset="right"==t.collapse?t.end:t.start,t}function As(t,e){return e&&(t.bad=!0),t}function Ts(t,e,n){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[n]))return As(t.clipPos(re(t.display.viewTo-1)),!0);e=null,n=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var i=0;i =e.display.viewTo||i.line =e.display.viewFrom&&Cs(e,r)||{node:n[0].measure.map[2],offset:0},i=i.line e.firstLine()&&(i=re(i.line-1,Xt(e.doc,i.line-1).length)),r.ch==Xt(e.doc,r.line).text.length&&r.line n.viewTo-1)return!1;var o,s=i.line==n.viewFrom||0==(s=tr(e,i.line))?(t=Qt(n.view[0].line),n.view[0].node):(t=Qt(n.view[s].line),n.view[s-1].node.nextSibling),r=tr(e,r.line),r=r==n.view.length-1?(o=n.viewTo-1,n.lineDiv.lastChild):(o=Qt(n.view[r+1].line)-1,n.view[r+1].node.previousSibling);if(!s)return!1;for(var a=e.doc.splitLines(function(s,t,e,a,l){var n="",u=!1,c=s.doc.lineSeparator(),h=!1;function f(){u&&(n+=c,h&&(n+=c),u=h=!1)}function d(t){t&&(f(),n+=t)}for(;!function t(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)d(n);else if(n=e.getAttribute("cm-marker"))(n=s.findMarks(re(a,0),re(l+1,0),(o=+n,function(t){return t.id==o}))).length&&(r=n[0].find(0))&&d($t(s.doc,r.from,r.to).join(c));else if("false"!=e.getAttribute("contenteditable")){var r=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(/^br$/i.test(e.nodeName)||0!=e.textContent.length){r&&f();for(var i=0;i i.ch&&p.charCodeAt(p.length-c-1)==g.charCodeAt(g.length-c-1);)u--,c++;a[a.length-1]=p.slice(0,p.length-c).replace(/^\u200b+/,""),a[0]=a[0].slice(u).replace(/\u200b+$/,"");s=re(t,u),r=re(o,l.length?q(l).length-c:0);return 1 n&&(fs(this,i.head.line,t,!0),n=i.head.line,r==this.doc.sel.primIndex&&br(this));else{for(var o=i.from(),s=i.to(),i=Math.max(n,o.line),n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1,a=i;a >1;if((s?n[2*s-1]:0)>=o)i=s;else{if(!(n[2*s+1] o)&&t.top>e.offsetHeight?l=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=o&&(l=t.bottom),u+e.offsetWidth>s&&(u=s-e.offsetWidth)),e.style.top=l+"px",e.style.left=e.style.right="","right"==i?(u=a.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(a.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),n&&(n=this,e={left:u,top:l,right:u+e.offsetWidth,bottom:l+e.offsetHeight},null!=(e=yr(n,e)).scrollTop&&Ar(n,e.scrollTop),null!=e.scrollLeft&&kr(n,e.scrollLeft))},triggerOnKeyDown:Pr(qo),triggerOnKeyPress:Pr(Xo),triggerOnKeyUp:Go,triggerOnMouseDown:Pr(Qo),execCommand:function(t){if(Uo.hasOwnProperty(t))return Uo[t].call(null,this)},triggerElectric:Pr(function(t){vs(this,t)}),findPosH:function(t,e,n,r){var i=1;e<0&&(i=-1,e=-e);for(var o=ce(this.doc,t),s=0;s !?|~^@]/,v=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function y(t,e,n){return p=t,g=n,e}function x(t,e){var i,n=t.next();if('"'==n||"'"==n)return e.tokenize=(i=n,function(t,e){var n,r=!1;if(o&&"@"==t.peek()&&t.match(v))return e.tokenize=x,y("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=i||r);)r=!r&&"\\"==n;return r||(e.tokenize=x),y("string","string")}),e.tokenize(t,e);if("."==n&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return y("number","number");if("."==n&&t.match(".."))return y("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return y(n);if("="==n&&t.eat(">"))return y("=>","operator");if("0"==n&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return y("number","number");if(/\d/.test(n))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),y("number","number");if("/"==n)return t.eat("*")?(e.tokenize=b)(t,e):t.eat("/")?(t.skipToEnd(),y("comment","comment")):Qt(t,e,1)?(function(t){for(var e,n=!1,r=!1;null!=(e=t.next());){if(!n){if("/"==e&&!r)return;"["==e?r=!0:r&&"]"==e&&(r=!1)}n=!n&&"\\"==e}}(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),y("regexp","string-2")):(t.eat("="),y("operator","operator",t.current()));if("`"==n)return(e.tokenize=w)(t,e);if("#"==n&&"!"==t.peek())return t.skipToEnd(),y("meta","meta");if("#"==n&&t.eatWhile(d))return y("variable","property");if("<"==n&&t.match("!--")||"-"==n&&t.match("->")&&!/\S/.test(t.string.slice(0,t.start)))return t.skipToEnd(),y("comment","comment");if(m.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=n&&"="!=n||t.eat("="):/[<>*+\-|&?]/.test(n)&&(t.eat(n),">"==n&&t.eat(n))),"?"==n&&t.eat(".")?y("."):y("operator","operator",t.current());if(d.test(n)){t.eatWhile(d);n=t.current();if("."!=e.lastType){if(a.propertyIsEnumerable(n)){e=a[n];return y(e.type,e.style,n)}if("async"==n&&t.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return y("async","keyword",n)}return y("variable","variable",n)}}function b(t,e){for(var n,r=!1;n=t.next();){if("/"==n&&r){e.tokenize=x;break}r="*"==n}return y("comment","comment")}function w(t,e){for(var n,r=!1;null!=(n=t.next());){if(!r&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=x;break}r=!r&&"\\"==n}return y("quasi","string-2",t.current())}var S="([{}])";function C(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n,r=t.string.indexOf("=>",t.start);if(!(r<0)){!u||(n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,r)))&&(r=n.index);for(var i=0,o=!1,s=r-1;0<=s;--s){var a=t.string.charAt(s),l=S.indexOf(a);if(0<=l&&l<3){if(!i){++s;break}if(0==--i){"("==a&&(o=!0);break}}else if(3<=l&&l<6)++i;else if(d.test(a))o=!0;else if(/["'\/`]/.test(a))for(;;--s){if(0==s)return;if(t.string.charAt(s-1)==a&&"\\"!=t.string.charAt(s-2)){s--;break}}else if(o&&!i){++s;break}}o&&!i&&(e.fatArrowAt=s)}}var A={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function T(t,e,n,r,i,o){this.indented=t,this.column=e,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function k(t,e,n,r,i){var o=t.cc;for(R.state=t,R.stream=i,R.marked=null,R.cc=o,R.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;)if((o.length?o.pop():s?V:F)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return R.marked?R.marked:"variable"==n&&function(t,e){for(var n=t.localVars;n;n=n.next)if(n.name==e)return 1;for(var r=t.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==e)return 1}(t,r)?"variable-2":e}}var R={state:null,column:null,marked:null,cc:null};function M(){for(var t=arguments.length-1;0<=t;t--)R.cc.push(arguments[t])}function E(){return M.apply(null,arguments),!0}function N(t,e){for(var n=e;n;n=n.next)if(n.name==t)return 1}function L(t){var e=R.state;if(R.marked="def",e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var n=function t(e,n){{if(n){if(n.block){var r=t(e,n.prev);return r?r==n.prev?n:new D(r,n.vars,!0):null}return N(e,n.vars)?n:new D(n.prev,new B(e,n.vars),!1)}return null}}(t,e.context);if(null!=n)return void(e.context=n)}else if(!N(t,e.localVars))return void(e.localVars=new B(t,e.localVars));c.globalVars&&!N(t,e.globalVars)&&(e.globalVars=new B(t,e.globalVars))}function I(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function D(t,e,n){this.prev=t,this.vars=e,this.block=n}function B(t,e){this.name=t,this.next=e}var O=new B("this",new B("arguments",null));function H(){R.state.context=new D(R.state.context,R.state.localVars,!1),R.state.localVars=O}function P(){R.state.context=new D(R.state.context,R.state.localVars,!0),R.state.localVars=null}function U(){R.state.localVars=R.state.context.vars,R.state.context=R.state.context.prev}function _(r,i){function t(){var t=R.state,e=t.indented;if("stat"==t.lexical.type)e=t.lexical.indented;else for(var n=t.lexical;n&&")"==n.type&&n.align;n=n.prev)e=n.indented;t.lexical=new T(e,R.stream.column(),r,null,t.lexical,i)}return t.lex=!0,t}function K(){var t=R.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function j(n){return function t(e){return e==n?E():";"==n||"}"==e||")"==e||"]"==e?M():E(t)}}function F(t,e){return"var"==t?E(_("vardef",e),At,j(";"),K):"keyword a"==t?E(_("form"),W,F,K):"keyword b"==t?E(_("form"),F,K):"keyword d"==t?R.stream.match(/^\s*$/,!1)?E():E(_("stat"),G,j(";"),K):"debugger"==t?E(j(";")):"{"==t?E(_("}"),P,ct,K,U):";"==t?E():"if"==t?("else"==R.state.lexical.info&&R.state.cc[R.state.cc.length-1]==K&&R.state.cc.pop()(),E(_("form"),W,F,K,Nt)):"function"==t?E(Bt):"for"==t?E(_("form"),Lt,F,K):"class"==t||u&&"interface"==e?(R.marked="keyword",E(_("form","class"==t?t:e),_t,K)):"variable"==t?u&&"declare"==e?(R.marked="keyword",E(F)):u&&("module"==e||"enum"==e||"type"==e)&&R.stream.match(/^\s*\w/,!1)?(R.marked="keyword","enum"==e?E(Yt):"type"==e?E(Ht,j("operator"),gt,j(";")):E(_("form"),Tt,j("{"),_("}"),ct,K,K)):u&&"namespace"==e?(R.marked="keyword",E(_("form"),V,F,K)):u&&"abstract"==e?(R.marked="keyword",E(F)):E(_("stat"),rt):"switch"==t?E(_("form"),W,j("{"),_("}","switch"),P,ct,K,K,U):"case"==t?E(V,j(":")):"default"==t?E(j(":")):"catch"==t?E(_("form"),H,z,F,K,U):"export"==t?E(_("stat"),zt,K):"import"==t?E(_("stat"),Jt,K):"async"==t?E(F):"@"==e?E(V,F):M(_("stat"),V,j(";"),K)}function z(t){if("("==t)return E(Pt,j(")"))}function V(t,e){return q(t,e,!1)}function J(t,e){return q(t,e,!0)}function W(t){return"("!=t?M():E(_(")"),G,j(")"),K)}function q(t,e,n){if(R.state.fatArrowAt==R.stream.start){var r=n?tt:Q;if("("==t)return E(H,_(")"),lt(Pt,")"),K,j("=>"),r,U);if("variable"==t)return M(H,Tt,j("=>"),r,U)}var i,r=n?$:X;return A.hasOwnProperty(t)?E(r):"function"==t?E(Bt,r):"class"==t||u&&"interface"==e?(R.marked="keyword",E(_("form"),Ut,K)):"keyword c"==t||"async"==t?E(n?J:V):"("==t?E(_(")"),G,j(")"),K,r):"operator"==t||"spread"==t?E(n?J:V):"["==t?E(_("]"),$t,K,r):"{"==t?ut(ot,"}",null,r):"quasi"==t?M(Y,r):"new"==t?E((i=n,function(t){return"."==t?E(i?nt:et):"variable"==t&&u?E(wt,i?$:X):M(i?J:V)})):E()}function G(t){return t.match(/[;\}\)\],]/)?M():M(V)}function X(t,e){return","==t?E(G):$(t,e,!1)}function $(t,e,n){var r=0==n?X:$,i=0==n?V:J;return"=>"==t?E(H,n?tt:Q,U):"operator"==t?/\+\+|--/.test(e)||u&&"!"==e?E(r):u&&"<"==e&&R.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?E(_(">"),lt(gt,">"),K,r):"?"==e?E(V,j(":"),i):E(i):"quasi"==t?M(Y,r):";"!=t?"("==t?ut(J,")","call",r):"."==t?E(it,r):"["==t?E(_("]"),G,j("]"),K,r):u&&"as"==e?(R.marked="keyword",E(gt,r)):"regexp"==t?(R.state.lastType=R.marked="operator",R.stream.backUp(R.stream.pos-R.stream.start-1),E(i)):void 0:void 0}function Y(t,e){return"quasi"!=t?M():"${"!=e.slice(e.length-2)?E(Y):E(V,Z)}function Z(t){if("}"==t)return R.marked="string-2",R.state.tokenize=w,E(Y)}function Q(t){return C(R.stream,R.state),M("{"==t?F:V)}function tt(t){return C(R.stream,R.state),M("{"==t?F:J)}function et(t,e){if("target"==e)return R.marked="keyword",E(X)}function nt(t,e){if("target"==e)return R.marked="keyword",E($)}function rt(t){return":"==t?E(K,F):M(X,j(";"),K)}function it(t){if("variable"==t)return R.marked="property",E()}function ot(t,e){return"async"==t?(R.marked="property",E(ot)):"variable"!=t&&"keyword"!=R.style?"number"==t||"string"==t?(R.marked=o?"property":R.style+" property",E(at)):"jsonld-keyword"==t?E(at):u&&I(e)?(R.marked="keyword",E(ot)):"["==t?E(V,ht,j("]"),at):"spread"==t?E(J,at):"*"==e?(R.marked="keyword",E(ot)):":"==t?M(at):void 0:(R.marked="property","get"==e||"set"==e?E(st):(u&&R.state.fatArrowAt==R.stream.start&&(n=R.stream.match(/^\s*:\s*/,!1))&&(R.state.fatArrowAt=R.stream.pos+n[0].length),E(at)));var n}function st(t){return"variable"!=t?M(at):(R.marked="property",E(Bt))}function at(t){return":"==t?E(J):"("==t?M(Bt):void 0}function lt(r,i,o){function s(t,e){if(o?-1 "),gt):void 0}function mt(t){if("=>"==t)return E(gt)}function vt(t){return t.match(/[\}\)\]]/)?E():","==t||";"==t?E(vt):M(yt,vt)}function yt(t,e){return"variable"==t||"keyword"==R.style?(R.marked="property",E(yt)):"?"==e||"number"==t||"string"==t?E(yt):":"==t?E(gt):"["==t?E(j("variable"),ft,j("]"),yt):"("==t?M(Ot,yt):t.match(/[;\}\)\],]/)?void 0:E()}function xt(t,e){return"variable"==t&&R.stream.match(/^\s*[?:]/,!1)||"?"==e?E(xt):":"==t?E(gt):"spread"==t?E(xt):M(gt)}function bt(t,e){return"<"==e?E(_(">"),lt(gt,">"),K,bt):"|"==e||"."==t||"&"==e?E(gt):"["==t?E(gt,j("]"),bt):"extends"==e||"implements"==e?(R.marked="keyword",E(gt)):"?"==e?E(gt,j(":"),gt):void 0}function wt(t,e){if("<"==e)return E(_(">"),lt(gt,">"),K,bt)}function St(){return M(gt,Ct)}function Ct(t,e){if("="==e)return E(gt)}function At(t,e){return"enum"==e?(R.marked="keyword",E(Yt)):M(Tt,ht,Mt,Et)}function Tt(t,e){return u&&I(e)?(R.marked="keyword",E(Tt)):"variable"==t?(L(e),E()):"spread"==t?E(Tt):"["==t?ut(Rt,"]"):"{"==t?ut(kt,"}"):void 0}function kt(t,e){return"variable"!=t||R.stream.match(/^\s*:/,!1)?("variable"==t&&(R.marked="property"),"spread"==t?E(Tt):"}"==t?M():"["==t?E(V,j("]"),j(":"),kt):E(j(":"),Tt,Mt)):(L(e),E(Mt))}function Rt(){return M(Tt,Mt)}function Mt(t,e){if("="==e)return E(J)}function Et(t){if(","==t)return E(At)}function Nt(t,e){if("keyword b"==t&&"else"==e)return E(_("form","else"),F,K)}function Lt(t,e){return"await"==e?E(Lt):"("==t?E(_(")"),It,K):void 0}function It(t){return"var"==t?E(At,Dt):("variable"==t?E:M)(Dt)}function Dt(t,e){return")"==t?E():";"==t?E(Dt):"in"==e||"of"==e?(R.marked="keyword",E(V,Dt)):M(V,Dt)}function Bt(t,e){return"*"==e?(R.marked="keyword",E(Bt)):"variable"==t?(L(e),E(Bt)):"("==t?E(H,_(")"),lt(Pt,")"),K,dt,F,U):u&&"<"==e?E(_(">"),lt(St,">"),K,Bt):void 0}function Ot(t,e){return"*"==e?(R.marked="keyword",E(Ot)):"variable"==t?(L(e),E(Ot)):"("==t?E(H,_(")"),lt(Pt,")"),K,dt,U):u&&"<"==e?E(_(">"),lt(St,">"),K,Ot):void 0}function Ht(t,e){return"keyword"==t||"variable"==t?(R.marked="type",E(Ht)):"<"==e?E(_(">"),lt(St,">"),K):void 0}function Pt(t,e){return"@"==e&&E(V,Pt),"spread"==t?E(Pt):u&&I(e)?(R.marked="keyword",E(Pt)):u&&"this"==t?E(ht,Mt):M(Tt,ht,Mt)}function Ut(t,e){return("variable"==t?_t:Kt)(t,e)}function _t(t,e){if("variable"==t)return L(e),E(Kt)}function Kt(t,e){return"<"==e?E(_(">"),lt(St,">"),K,Kt):"extends"==e||"implements"==e||u&&","==t?("implements"==e&&(R.marked="keyword"),E(u?gt:V,Kt)):"{"==t?E(_("}"),jt,K):void 0}function jt(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||u&&I(e))&&R.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(R.marked="keyword",E(jt)):"variable"==t||"keyword"==R.style?(R.marked="property",E(Ft,jt)):"number"==t||"string"==t?E(Ft,jt):"["==t?E(V,ht,j("]"),Ft,jt):"*"==e?(R.marked="keyword",E(jt)):u&&"("==t?M(Ot,jt):";"==t||","==t?E(jt):"}"==t?E():"@"==e?E(V,jt):void 0}function Ft(t,e){if("?"==e)return E(Ft);if(":"==t)return E(gt,Mt);if("="==e)return E(J);e=R.state.lexical.prev;return M(e&&"interface"==e.info?Ot:Bt)}function zt(t,e){return"*"==e?(R.marked="keyword",E(Xt,j(";"))):"default"==e?(R.marked="keyword",E(V,j(";"))):"{"==t?E(lt(Vt,"}"),Xt,j(";")):M(F)}function Vt(t,e){return"as"==e?(R.marked="keyword",E(j("variable"))):"variable"==t?M(J,Vt):void 0}function Jt(t){return"string"==t?E():"("==t?M(V):"."==t?M(X):M(Wt,qt,Xt)}function Wt(t,e){return"{"==t?ut(Wt,"}"):("variable"==t&&L(e),"*"==e&&(R.marked="keyword"),E(Gt))}function qt(t){if(","==t)return E(Wt,qt)}function Gt(t,e){if("as"==e)return R.marked="keyword",E(Wt)}function Xt(t,e){if("from"==e)return R.marked="keyword",E(V)}function $t(t){return"]"==t?E():M(lt(J,"]"))}function Yt(){return M(_("form"),Tt,j("{"),_("}"),lt(Zt,"}"),K,K)}function Zt(){return M(Tt,Mt)}function Qt(t,e,n){return e.tokenize==x&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}return K.lex=U.lex=!0,{startState:function(t){t={tokenize:x,lastType:"sof",cc:[],lexical:new T((t||0)-h,0,"block",!1),localVars:c.localVars,context:c.localVars&&new D(null,null,!1),indented:t||0};return c.globalVars&&"object"==typeof c.globalVars&&(t.globalVars=c.globalVars),t},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),C(t,e)),e.tokenize!=b&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==p?n:(e.lastType="operator"!=p||"++"!=g&&"--"!=g?p:"incdec",k(e,n,p,g,t))},indent:function(t,e){if(t.tokenize==b||t.tokenize==w)return te.Pass;if(t.tokenize!=x)return 0;var n,r=e&&e.charAt(0),i=t.lexical;if(!/^\s*else\b/.test(e))for(var o=t.cc.length-1;0<=o;--o){var s=t.cc[o];if(s==K)i=i.prev;else if(s!=Nt)break}for(;("stat"==i.type||"form"==i.type)&&("}"==r||(n=t.cc[t.cc.length-1])&&(n==X||n==$)&&!/^[,\.=+\-*:?[\(]/.test(e));)i=i.prev;var a,l=(i=f&&")"==i.type&&"stat"==i.prev.type?i.prev:i).type,u=r==l;return"vardef"==l?i.indented+("operator"==t.lastType||","==t.lastType?i.info.length+1:0):"form"==l&&"{"==r?i.indented:"form"==l?i.indented+h:"stat"==l?i.indented+(a=e,"operator"==(l=t).lastType||","==l.lastType||m.test(a.charAt(0))||/[,.]/.test(a.charAt(0))?f||h:0):"switch"!=i.info||u||0==c.doubleIndentSwitch?i.align?i.column+(u?0:1):i.indented+(u?0:h):i.indented+(/^(?:case|default)\b/.test(e)?h:2*h)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:o,jsonMode:s,expressionAllowed:Qt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=V&&e!=J||t.cc.pop()}}}),te.registerHelper("wordChars","javascript",/[\w$]/),te.defineMIME("text/javascript","javascript"),te.defineMIME("text/ecmascript","javascript"),te.defineMIME("application/javascript","javascript"),te.defineMIME("application/x-javascript","javascript"),te.defineMIME("application/ecmascript","javascript"),te.defineMIME("application/json",{name:"javascript",json:!0}),te.defineMIME("application/x-json",{name:"javascript",json:!0}),te.defineMIME("application/manifest+json",{name:"javascript",json:!0}),te.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),te.defineMIME("text/typescript",{name:"javascript",typescript:!0}),te.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(C){"use strict";var A={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},T={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};C.defineMode("xml",function(t,e){var n,o,s,a=t.indentUnit,l={},r=e.htmlMode?A:T;for(n in r)l[n]=r[n];for(n in e)l[n]=e[n];function u(e,n){function t(t){return(n.tokenize=t)(e,n)}var r=e.next();if("<"==r)return e.eat("!")?e.eat("[")?e.match("CDATA[")?t(i("atom","]]>")):null:e.match("--")?t(i("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),t(function r(i){return function(t,e){for(var n;null!=(n=t.next());){if("<"==n)return e.tokenize=r(i+1),e.tokenize(t,e);if(">"==n){if(1!=i)return e.tokenize=r(i-1),e.tokenize(t,e);e.tokenize=u;break}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),n.tokenize=i("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",n.tokenize=c,"tag bracket");if("&"!=r)return e.eatWhile(/[^&<]/),null;r=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";");return r?"atom":"error"}function c(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=u,o=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return o="equals",null;if("<"!=n)return/[\'\"]/.test(n)?(e.tokenize=(r=n,i.isInAttribute=!0,i),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word");e.tokenize=u,e.state=p,e.tagName=e.tagStart=null;var r,e=e.tokenize(t,e);return e?e+" tag error":"tag error";function i(t,e){for(;!t.eol();)if(t.next()==r){e.tokenize=c;break}return"string"}}function i(n,r){return function(t,e){for(;!t.eol();){if(t.match(r)){e.tokenize=u;break}t.next()}return n}}function h(t,e,n){this.prev=t.context,this.tagName=e||"",this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function f(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(e))return;f(t)}}function p(t,e,n){return"openTag"==t?(n.tagStart=e.column(),g):"closeTag"==t?m:p}function g(t,e,n){return"word"==t?(n.tagName=e.current(),s="tag",x):l.allowMissingTagName&&"endTag"==t?(s="tag bracket",x(t,0,n)):(s="error",g)}function m(t,e,n){if("word"!=t)return l.allowMissingTagName&&"endTag"==t?(s="tag bracket",v(t,0,n)):(s="error",y);e=e.current();return n.context&&n.context.tagName!=e&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==e||!1===l.matchClosing?(s="tag",v):(s="tag error",y)}function v(t,e,n){return"endTag"!=t?(s="error",v):(f(n),p)}function y(t,e,n){return s="error",v(t,0,n)}function x(t,e,n){if("word"==t)return s="attribute",b;if("endTag"!=t&&"selfcloseTag"!=t)return s="error",x;var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(r)?d(n,r):(d(n,r),n.context=new h(n,r,i==n.indented)),p}function b(t,e,n){return"equals"==t?w:(l.allowMissing||(s="error"),x(t,0,n))}function w(t,e,n){return"string"==t?S:"word"==t&&l.allowUnquoted?(s="string",x):(s="error",x(t,0,n))}function S(t,e,n){return"string"==t?S:x(t,0,n)}return u.isInText=!0,{startState:function(t){var e={tokenize:u,state:p,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;o=null;var n=e.tokenize(t,e);return(n||o)&&"comment"!=n&&(s=null,e.state=e.state(o||n,t,e),s&&(n="error"==s?n+" error":s)),n},indent:function(t,e,n){var r=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+a;if(r&&r.noIndent)return C.Pass;if(t.tokenize!=c&&t.tokenize!=u)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==w&&(t.state=x)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)e.push(n.tagName);return e.reverse()}}}),C.defineMIME("text/xml","xml"),C.defineMIME("application/xml","xml"),C.mimeModes.hasOwnProperty("text/html")||C.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("yaml",function(){var i=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i");return{token:function(t,e){var n=t.peek(),r=e.escaped;if(e.escaped=!1,"#"==n&&(0==t.pos||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment";if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(e.literal&&t.indentation()>e.keyCol)return t.skipToEnd(),"string";if(e.literal&&(e.literal=!1),t.sol()){if(e.keyCol=0,e.pair=!1,e.pairStart=!1,t.match("---"))return"def";if(t.match("..."))return"def";if(t.match(/\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==n?e.inlinePairs++:"}"==n?e.inlinePairs--:"["==n?e.inlineList++:e.inlineList--,"meta";if(0 )\s*/))return e.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==e.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(0 '"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(e.pair=!0,e.keyCol=t.indentation(),"atom"):e.pair&&t.match(/^:\s*/)?(e.pairStart=!0,"meta"):(e.pairStart=!1,e.escaped="\\"==n,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),t.defineMIME("text/x-yaml","yaml"),t.defineMIME("text/yaml","yaml")}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],t):t(CodeMirror)}(function(h){"use strict";var i={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};var n={};function f(t,e){e=t.match(n[e=e]||(n[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")));return e?/^\s*(.*?)\s*$/.exec(e[2])[1]:""}function d(t,e){return new RegExp((e?"^":"")+" >>2]>>>24-o%4*8&255;e[r+o>>>2]|=s<<24-(r+o)%4*8}else if(65535 >>2]=n[o>>>2];else e.push.apply(e,n);return this.sigBytes+=i,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=u.ceil(e/4)},clone:function(){var t=n.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n >>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r >>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new c.init(n,e/2)}},s=i.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i >>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r >>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new c.init(n,e)}},a=i.Utf8={stringify:function(t){try{return decodeURIComponent(escape(s.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return s.parse(unescape(encodeURIComponent(t)))}},l=e.BufferedBlockAlgorithm=n.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=a.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e=this._data,n=e.words,r=e.sigBytes,i=this.blockSize,o=r/(4*i),s=(o=t?u.ceil(o):u.max((0|o)-this._minBufferSize,0))*i,r=u.min(4*s,r);if(s){for(var a=0;a >>31);var u=(r<<5|r>>>27)+a+c[l];u+=l<20?1518500249+(i&o|~i&s):l<40?1859775393+(i^o^s):l<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,a=s,s=o,o=i<<30|i>>>2,i=r,r=u}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(64+r>>>9<<4)]=Math.floor(n/4294967296),e[15+(64+r>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA1=r._createHelper(e),t.HmacSHA1=r._createHmacHelper(e)}(),function(){var u=CryptoJS.lib.WordArray;CryptoJS.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var i=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a >>6*(3-a)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(t){var e=t.length,n=this._map,r=n.charAt(64);!r||-1!=(r=t.indexOf(r))&&(e=r);for(var i,o,s=[],a=0,l=0;l >>6-l%4*2,s[a>>>2]|=(i|o)<<24-a%4*8,a++);return u.create(s,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(l){var t=CryptoJS,e=t.lib,n=e.WordArray,r=e.Hasher,e=t.algo,k=[];!function(){for(var t=0;t<64;t++)k[t]=4294967296*l.abs(l.sin(t+1))|0}();e=e.MD5=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=t[e+0],a=t[e+1],l=t[e+2],u=t[e+3],c=t[e+4],h=t[e+5],f=t[e+6],d=t[e+7],p=t[e+8],g=t[e+9],m=t[e+10],v=t[e+11],y=t[e+12],x=t[e+13],b=t[e+14],w=t[e+15],S=R(S=o[0],T=o[1],A=o[2],C=o[3],s,7,k[0]),C=R(C,S,T,A,a,12,k[1]),A=R(A,C,S,T,l,17,k[2]),T=R(T,A,C,S,u,22,k[3]);S=R(S,T,A,C,c,7,k[4]),C=R(C,S,T,A,h,12,k[5]),A=R(A,C,S,T,f,17,k[6]),T=R(T,A,C,S,d,22,k[7]),S=R(S,T,A,C,p,7,k[8]),C=R(C,S,T,A,g,12,k[9]),A=R(A,C,S,T,m,17,k[10]),T=R(T,A,C,S,v,22,k[11]),S=R(S,T,A,C,y,7,k[12]),C=R(C,S,T,A,x,12,k[13]),A=R(A,C,S,T,b,17,k[14]),S=M(S,T=R(T,A,C,S,w,22,k[15]),A,C,a,5,k[16]),C=M(C,S,T,A,f,9,k[17]),A=M(A,C,S,T,v,14,k[18]),T=M(T,A,C,S,s,20,k[19]),S=M(S,T,A,C,h,5,k[20]),C=M(C,S,T,A,m,9,k[21]),A=M(A,C,S,T,w,14,k[22]),T=M(T,A,C,S,c,20,k[23]),S=M(S,T,A,C,g,5,k[24]),C=M(C,S,T,A,b,9,k[25]),A=M(A,C,S,T,u,14,k[26]),T=M(T,A,C,S,p,20,k[27]),S=M(S,T,A,C,x,5,k[28]),C=M(C,S,T,A,l,9,k[29]),A=M(A,C,S,T,d,14,k[30]),S=E(S,T=M(T,A,C,S,y,20,k[31]),A,C,h,4,k[32]),C=E(C,S,T,A,p,11,k[33]),A=E(A,C,S,T,v,16,k[34]),T=E(T,A,C,S,b,23,k[35]),S=E(S,T,A,C,a,4,k[36]),C=E(C,S,T,A,c,11,k[37]),A=E(A,C,S,T,d,16,k[38]),T=E(T,A,C,S,m,23,k[39]),S=E(S,T,A,C,x,4,k[40]),C=E(C,S,T,A,s,11,k[41]),A=E(A,C,S,T,u,16,k[42]),T=E(T,A,C,S,f,23,k[43]),S=E(S,T,A,C,g,4,k[44]),C=E(C,S,T,A,y,11,k[45]),A=E(A,C,S,T,w,16,k[46]),S=N(S,T=E(T,A,C,S,l,23,k[47]),A,C,s,6,k[48]),C=N(C,S,T,A,d,10,k[49]),A=N(A,C,S,T,b,15,k[50]),T=N(T,A,C,S,h,21,k[51]),S=N(S,T,A,C,y,6,k[52]),C=N(C,S,T,A,u,10,k[53]),A=N(A,C,S,T,m,15,k[54]),T=N(T,A,C,S,a,21,k[55]),S=N(S,T,A,C,p,6,k[56]),C=N(C,S,T,A,w,10,k[57]),A=N(A,C,S,T,f,15,k[58]),T=N(T,A,C,S,x,21,k[59]),S=N(S,T,A,C,c,6,k[60]),C=N(C,S,T,A,v,10,k[61]),A=N(A,C,S,T,l,15,k[62]),T=N(T,A,C,S,g,21,k[63]),o[0]=o[0]+S|0,o[1]=o[1]+T|0,o[2]=o[2]+A|0,o[3]=o[3]+C|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32;var i=l.floor(n/4294967296),n=n;e[15+(64+r>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),e[14+(64+r>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process();for(var e=this._hash,o=e.words,s=0;s<4;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return e},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});function R(t,e,n,r,i,o,s){s=t+(e&n|~e&r)+i+s;return(s< >>32-o)+e}function M(t,e,n,r,i,o,s){s=t+(e&r|n&~r)+i+s;return(s< >>32-o)+e}function E(t,e,n,r,i,o,s){s=t+(e^n^r)+i+s;return(s< >>32-o)+e}function N(t,e,n,r,i,o,s){s=t+(n^(e|~r))+i+s;return(s< >>32-o)+e}t.MD5=r._createHelper(e),t.HmacMD5=r._createHmacHelper(e)}(Math),(YAHOO=void 0===YAHOO?{}:YAHOO).lang={extend:function(t,e,n){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");function r(){}if(r.prototype=e.prototype,t.prototype=new r,(t.prototype.constructor=t).superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),n){for(var i in n)t.prototype[i]=n[i];var e=function(){},o=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(e=function(t,e){for(i=0;i >>2]>>>24-o%4*8&255;e[r+o>>>2]|=s<<24-(r+o)%4*8}else for(o=0;o>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=u.ceil(e/4)},clone:function(){var t=n.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n >>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r >>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new c.init(n,e/2)}},s=i.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i >>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r >>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new c.init(n,e)}},a=i.Utf8={stringify:function(t){try{return decodeURIComponent(escape(s.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return s.parse(unescape(encodeURIComponent(t)))}},l=e.BufferedBlockAlgorithm=n.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=a.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e=this._data,n=e.words,r=e.sigBytes,i=this.blockSize,o=r/(4*i),s=(o=t?u.ceil(o):u.max((0|o)-this._minBufferSize,0))*i,r=u.min(4*s,r);if(s){for(var a=0;a >>2]}},t.BlockCipher=o.extend({cfg:o.cfg.extend({mode:l,padding:u}),reset:function(){o.reset.call(this);var t,e=(n=this.cfg).iv,n=n.mode;this._xformMode==this._ENC_XFORM_MODE?t=n.createEncryptor:(t=n.createDecryptor,this._minBufferSize=1),this._mode=t.call(n,this,e&&e.words)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4});var c=t.CipherParams=e.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),l=(f.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext;return((t=t.salt)?s.create([1398893684,1701076831]).concat(t).concat(e):e).toString(r)},parse:function(t){var e,n=(t=r.parse(t)).words;return 1398893684==n[0]&&1701076831==n[1]&&(e=s.create(n.slice(2,4)),n.splice(0,4),t.sigBytes-=16),c.create({ciphertext:t,salt:e})}},h=t.SerializableCipher=e.extend({cfg:e.extend({format:l}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r);return e=i.finalize(e),i=i.cfg,c.create({ciphertext:e,key:n,iv:i.iv,algorithm:t,mode:i.mode,padding:i.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),f=(f.kdf={}).OpenSSL={execute:function(t,e,n,r){return r=r||s.random(8),t=i.create({keySize:e+n}).compute(t,r),n=s.create(t.words.slice(e),4*n),t.sigBytes=4*e,c.create({key:t,iv:n,salt:r})}},d=t.PasswordBasedCipher=h.extend({cfg:h.cfg.extend({kdf:f}),encrypt:function(t,e,n,r){return n=(r=this.cfg.extend(r)).kdf.execute(n,t.keySize,t.ivSize),r.iv=n.iv,(t=h.encrypt.call(this,t,e,n.key,r)).mixIn(n),t},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),n=r.kdf.execute(n,t.keySize,t.ivSize,e.salt),r.iv=n.iv,h.decrypt.call(this,t,e,n.key,r)}})}(),function(){var t=CryptoJS,e=(r=t.lib).WordArray,n=r.Hasher,c=[],r=t.algo.SHA1=n.extend({_doReset:function(){this._hash=new e.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n,r=this._hash.words,i=r[0],o=r[1],s=r[2],a=r[3],l=r[4],u=0;u<80;u++)u<16?c[u]=0|t[e+u]:(n=c[u-3]^c[u-8]^c[u-14]^c[u-16],c[u]=n<<1|n>>>31),n=(i<<5|i>>>27)+l+c[u],n=u<20?n+(1518500249+(o&s|~o&a)):u<40?n+(1859775393+(o^s^a)):u<60?n+((o&s|o&a|s&a)-1894007588):n+((o^s^a)-899497514),l=a,a=s,s=o<<30|o>>>2,o=i,i=n;r[0]=r[0]+i|0,r[1]=r[1]+o|0,r[2]=r[2]+s|0,r[3]=r[3]+a|0,r[4]=r[4]+l|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(64+r>>>9<<4)]=Math.floor(n/4294967296),e[15+(64+r>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA1=n._createHelper(r),t.HmacSHA1=n._createHmacHelper(r)}(),function(i){function t(t){return 4294967296*(t-(0|t))|0}for(var e=CryptoJS,n=(o=e.lib).WordArray,r=o.Hasher,o=e.algo,s=[],p=[],a=2,l=0;l<64;){t:{for(var u,c=i.sqrt(u=a),h=2;h<=c;h++)if(!(u%h)){u=!1;break t}u=!0}u&&(l<8&&(s[l]=t(i.pow(a,.5))),p[l]=t(i.pow(a,1/3)),l++),a++}var g=[],o=o.SHA256=r.extend({_doReset:function(){this._hash=new n.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n,r,i=this._hash.words,o=i[0],s=i[1],a=i[2],l=i[3],u=i[4],c=i[5],h=i[6],f=i[7],d=0;d<64;d++)d<16?g[d]=0|t[e+d]:(n=g[d-15],r=g[d-2],g[d]=((n<<25|n>>>7)^(n<<14|n>>>18)^n>>>3)+g[d-7]+((r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10)+g[d-16]),n=f+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&c^~u&h)+p[d]+g[d],r=((o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22))+(o&s^o&a^s&a),f=h,h=c,c=u,u=l+n|0,l=a,a=s,s=o,o=n+r|0;i[0]=i[0]+o|0,i[1]=i[1]+s|0,i[2]=i[2]+a|0,i[3]=i[3]+l|0,i[4]=i[4]+u|0,i[5]=i[5]+c|0,i[6]=i[6]+h|0,i[7]=i[7]+f|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(64+r>>>9<<4)]=i.floor(n/4294967296),e[15+(64+r>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=r._createHelper(o),e.HmacSHA256=r._createHmacHelper(o)}(Math),function(){function t(){return r.create.apply(r,arguments)}for(var e=CryptoJS,n=e.lib.Hasher,r=(o=e.x64).Word,i=o.WordArray,o=e.algo,et=[t(1116352408,3609767458),t(1899447441,602891725),t(3049323471,3964484399),t(3921009573,2173295548),t(961987163,4081628472),t(1508970993,3053834265),t(2453635748,2937671579),t(2870763221,3664609560),t(3624381080,2734883394),t(310598401,1164996542),t(607225278,1323610764),t(1426881987,3590304994),t(1925078388,4068182383),t(2162078206,991336113),t(2614888103,633803317),t(3248222580,3479774868),t(3835390401,2666613458),t(4022224774,944711139),t(264347078,2341262773),t(604807628,2007800933),t(770255983,1495990901),t(1249150122,1856431235),t(1555081692,3175218132),t(1996064986,2198950837),t(2554220882,3999719339),t(2821834349,766784016),t(2952996808,2566594879),t(3210313671,3203337956),t(3336571891,1034457026),t(3584528711,2466948901),t(113926993,3758326383),t(338241895,168717936),t(666307205,1188179964),t(773529912,1546045734),t(1294757372,1522805485),t(1396182291,2643833823),t(1695183700,2343527390),t(1986661051,1014477480),t(2177026350,1206759142),t(2456956037,344077627),t(2730485921,1290863460),t(2820302411,3158454273),t(3259730800,3505952657),t(3345764771,106217008),t(3516065817,3606008344),t(3600352804,1432725776),t(4094571909,1467031594),t(275423344,851169720),t(430227734,3100823752),t(506948616,1363258195),t(659060556,3750685593),t(883997877,3785050280),t(958139571,3318307427),t(1322822218,3812723403),t(1537002063,2003034995),t(1747873779,3602036899),t(1955562222,1575990012),t(2024104815,1125592928),t(2227730452,2716904306),t(2361852424,442776044),t(2428436474,593698344),t(2756734187,3733110249),t(3204031479,2999351573),t(3329325298,3815920427),t(3391569614,3928383900),t(3515267271,566280711),t(3940187606,3454069534),t(4118630271,4000239992),t(116418474,1914138554),t(174292421,2731055270),t(289380356,3203993006),t(460393269,320620315),t(685471733,587496836),t(852142971,1086792851),t(1017036298,365543100),t(1126000580,2618297676),t(1288033470,3409855158),t(1501505948,4234509866),t(1607167915,987167468),t(1816402316,1246189591)],nt=[],s=0;s<80;s++)nt[s]=t();o=o.SHA512=n.extend({_doReset:function(){this._hash=new i.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var n=(u=this._hash.words)[0],r=u[1],i=u[2],o=u[3],s=u[4],a=u[5],l=u[6],u=u[7],c=n.high,h=n.low,f=r.high,d=r.low,p=i.high,g=i.low,m=o.high,v=o.low,y=s.high,x=s.low,b=a.high,w=a.low,S=l.high,C=l.low,A=u.high,T=u.low,k=c,R=h,M=f,E=d,N=p,L=g,I=m,D=v,B=y,O=x,H=b,P=w,U=S,_=C,K=A,j=T,F=0;F<80;F++){var z,V=nt[F];F<16?(z=V.high=0|t[e+2*F],G=V.low=0|t[e+2*F+1]):(z=((G=(z=nt[F-15]).high)>>>1|(J=z.low)<<31)^(G>>>8|J<<24)^G>>>7,J=(J>>>1|G<<31)^(J>>>8|G<<24)^(J>>>7|G<<25),W=((G=(W=nt[F-2]).high)>>>19|(q=W.low)<<13)^(G<<3|q>>>29)^G>>>6,q=(q>>>19|G<<13)^(q<<3|G>>>29)^(q>>>6|G<<26),X=(G=nt[F-7]).high,tt=($=nt[F-16]).high,$=$.low,G=J+G.low,V.high=z=(z=(z=z+X+(G>>>0>>0?1:0))+W+((G=G+q)>>>0 >>0?1:0))+tt+((G=G+$)>>>0<$>>>0?1:0),V.low=G);var J,W,q,G,X=B&H^~B&U,$=O&P^~O&_,V=k&M^k&N^M&N,Y=R&E^R&L^E&L,Z=(q=et[F]).high,Q=q.low,tt=K+((B>>>14|O<<18)^(B>>>18|O<<14)^(B<<23|O>>>9))+((q=j+((O>>>14|B<<18)^(O>>>18|B<<14)^(O<<23|B>>>9)))>>>0>>0?1:0),K=U,j=_,U=H,_=P,H=B,P=O,B=I+(tt=(tt=(tt=tt+X+((q=q+$)>>>0<$>>>0?1:0))+Z+((q=q+Q)>>>0 >>0?1:0))+z+((q=q+G)>>>0>>0?1:0))+((O=D+q|0)>>>0 >>0?1:0)|0,I=N,D=L,N=M,L=E,M=k,E=R,k=tt+(V=(J=(k>>>28|R<<4)^(k<<30|R>>>2)^(k<<25|R>>>7))+V+((G=(W=(R>>>28|k<<4)^(R<<30|k>>>2)^(R<<25|k>>>7))+Y)>>>0 >>0?1:0))+((R=q+G|0)>>>0 >>0?1:0)|0}h=n.low=h+R,n.high=c+k+(h>>>0>>0?1:0),d=r.low=d+E,r.high=f+M+(d>>>0 >>0?1:0),g=i.low=g+L,i.high=p+N+(g>>>0 >>0?1:0),v=o.low=v+D,o.high=m+I+(v>>>0 >>0?1:0),x=s.low=x+O,s.high=y+B+(x>>>0 >>0?1:0),w=a.low=w+P,a.high=b+H+(w>>>0 >>0?1:0),C=l.low=C+_,l.high=S+U+(C>>>0<_>>>0?1:0),T=u.low=T+j,u.high=A+K+(T>>>0
>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[30+(128+r>>>10<<5)]=Math.floor(n/4294967296),e[31+(128+r>>>10<<5)]=n,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32}),e.SHA512=n._createHelper(o),e.HmacSHA512=n._createHmacHelper(o)}();var dbits,b64map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64pad="=";function hex2b64(t){for(var e,n="",r=0;r+3<=t.length;r+=3)e=parseInt(t.substring(r,r+3),16),n+=b64map.charAt(e>>6)+b64map.charAt(63&e);if(r+1==t.length?(e=parseInt(t.substring(r,r+1),16),n+=b64map.charAt(e<<2)):r+2==t.length&&(e=parseInt(t.substring(r,r+2),16),n+=b64map.charAt(e>>2)+b64map.charAt((3&e)<<4)),b64pad)for(;0<(3&n.length);)n+=b64pad;return n}function b64tohex(t){for(var e,n,r="",i=0,o=0;o >2),e=3&n,1):1==i?(r+=int2char(e<<2|n>>4),e=15&n,2):2==i?(r+=int2char(e),r+=int2char(n>>2),e=3&n,3):(r+=int2char(e<<2|n>>4),r+=int2char(15&n),0));return 1==i&&(r+=int2char(e<<2)),r}function b64toBA(t){for(var e=b64tohex(t),n=new Array,r=0;2*r >15;0<=--o;){var l=32767&this[t],u=this[t++]>>15,c=a*l+u*s;i=((l=s*l+((32767&c)<<15)+n[r]+(1073741823&i))>>>30)+(c>>>15)+a*u+(i>>>30),n[r++]=1073741823&l}return i}function am3(t,e,n,r,i,o){for(var s=16383&e,a=e>>14;0<=--o;){var l=16383&this[t],u=this[t++]>>14,c=a*l+u*s;i=((l=s*l+((16383&c)<<14)+n[r]+i)>>28)+(c>>14)+a*u,n[r++]=268435455&l}return i}dbits=j_lm&&"Microsoft Internet Explorer"==navigator.appName?(BigInteger.prototype.am=am2,30):j_lm&&"Netscape"!=navigator.appName?(BigInteger.prototype.am=am1,26):(BigInteger.prototype.am=am3,28),BigInteger.prototype.DB=dbits,BigInteger.prototype.DM=(1< this.DB?(this[this.t-1]|=(s&(1< >this.DB-o):this[this.t-1]|=s< =this.DB&&(o-=this.DB))}8==n&&0!=(128&t[0])&&(this.s=-1,0 >a)&&(i=!0,o=int2char(n));0<=s;)a >(a+=this.DB-e)):(n=this[s]>>(a-=e)&r,a<=0&&(a+=this.DB,--s)),(i=0 >>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function bnBitLength(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(t,e){for(var n=this.t-1;0<=n;--n)e[n+t]=this[n];for(n=t-1;0<=n;--n)e[n]=0;e.t=this.t+t,e.s=this.s}function bnpDRShiftTo(t,e){for(var n=t;n >r|s,s=(this[a]&i)< =this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,o=(1< >r;for(var s=n+1;s >r;0 >=this.DB;if(t.t >=this.DB;r+=this.s}else{for(r+=this.s;n >=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:0 =e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}0 >this.F2:0),c=this.FV/i,h=(1< >15,this.um=(1< >15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),0<=t.compareTo(this.m)&&t.subTo(this.m,t)}function montSqrTo(t,e){t.squareTo(e),this.reduce(e)}function montMulTo(t,e,n){t.multiplyTo(e,n),this.reduce(n)}function bnpIsEven(){return 0==(0 >24}function bnShortValue(){return 0==this.t?this.s:this[0]<<16>>16}function bnpChunkSize(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function bnSigNum(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function bnpToRadix(t){if(null==t&&(t=10),0==this.signum()||t<2||36 =n&&(this.dMultiply(r),this.dAddOffset(s,0),s=o=0))}0 t&&this.subTo(BigInteger.ONE.shiftLeft(t-1),this);else{var r=new Array,n=7&t;r.length=1+(t>>3),e.nextBytes(r),0 >r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s< >(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(0>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function bnGetLowestSetBit(){for(var t=0;t =this.t?0!=this.s:0!=(this[e]&1< >=this.DB;if(t.t >=this.DB;r+=this.s}else{for(r+=this.s;n >=this.DB;r+=t.s}e.s=r<0?-1:0,0 =this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}}function NullExp(){}function nNop(t){return t}function nMulTo(t,e,n){t.multiplyTo(e,n)}function nSqrTo(t,e){t.squareTo(e)}function bnPow(t){return this.exp(t,new NullExp)}function bnpMultiplyLowerTo(t,e,n){var r,i=Math.min(this.t+t.t,e);for(n.s=0,n.t=i;02*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=nbi();return t.copyTo(e),this.reduce(e),e}function barrettRevert(t){return t}function barrettReduce(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);0<=t.compareTo(this.m);)t.subTo(this.m,t)}function barrettSqrTo(t,e){t.squareTo(e),this.reduce(e)}function barrettMulTo(t,e,n){t.multiplyTo(e,n),this.reduce(n)}function bnModPow(t,e){var n=t.bitLength(),r=nbv(1);if(n<=0)return r;var i=n<18?1:n<48?3:n<144?4:n<768?5:6,o=new(n<8?Classic:e.isEven()?Barrett:Montgomery)(e),s=new Array,a=3,l=i-1,u=(1<>n-l&u:(h=(t[d]&(1< >this.DB+n-l)),a=i;0==(1&h);)h>>=1,--a;if((n-=a)<0&&(n+=this.DB,--d),p)s[h].copyTo(r),p=!1;else{for(;1>1)>lowprimes.length&&(t=lowprimes.length);for(var i=nbi(),o=0;o >8&255,rng_pool[rng_pptr++]^=t>>16&255,rng_pool[rng_pptr++]^=t>>24&255,rng_psize<=rng_pptr&&(rng_pptr-=rng_psize)}function rng_seed_time(){rng_seed_int((new Date).getTime())}if(null==rng_pool){var rng_pool=new Array,rng_pptr=0;if(void 0!==window&&(void 0!==window.crypto||void 0!==window.msCrypto)){var crypto=window.crypto||window.msCrypto;if(crypto.getRandomValues){var ua=new Uint8Array(32);for(crypto.getRandomValues(ua),t=0;t<32;++t)rng_pool[rng_pptr++]=ua[t]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5")for(var z=window.crypto.random(32),t=0;t >>8,rng_pool[rng_pptr++]=255&t;rng_pptr=0,rng_seed_time()}function rng_get_byte(){if(null==rng_state){for(rng_seed_time(),(rng_state=prng_newstate()).init(rng_pool),rng_pptr=0;rng_pptr >6|192):(n[--e]=63&i|128,n[--e]=i>>6&63|128,n[--e]=i>>12|224)}n[--e]=0;for(var o=new SecureRandom,s=new Array;2 >24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return r}function oaep_pad(t,e,n,r){var i,o=KJUR.crypto.MessageDigest,s=KJUR.crypto.Util;if("string"==typeof(n=n||"sha1")&&(i=o.getCanonicalAlgName(n),r=o.getHashLength(i),n=function(t){return hextorstr(s.hashHex(rstrtohex(t),i))}),t.length+2*r+2>e)throw"Message too long for RSA";for(var a="",l=0;l >3);if(null==t)return null;t=this.doPublic(t);if(null==t)return null;t=t.toString(16);return 0==(1&t.length)?t:"0"+t}function RSAEncryptOAEP(t,e,n){n=oaep_pad(t,this.n.bitLength()+7>>3,e,n);if(null==n)return null;n=this.doPublic(n);if(null==n)return null;n=n.toString(16);return 0==(1&n.length)?n:"0"+n}function pkcs1unpad2(t,e){for(var n=t.toByteArray(),r=0;r =n.length)return null;for(var i="";++r >24,(16711680&i)>>16,(65280&i)>>8,255&i])),i+=1;return r}function oaep_unpad(t,e,n,r){var i,o=KJUR.crypto.MessageDigest,s=KJUR.crypto.Util;for("string"==typeof(n=n||"sha1")&&(i=o.getCanonicalAlgName(n),r=o.getHashLength(i),n=function(t){return hextorstr(s.hashHex(rstrtohex(t),i))}),t=t.toByteArray(),a=0;a >1;this.e=parseInt(e,16);for(var i=new BigInteger(e,16);;){for(;this.p=new BigInteger(t-r,1,n),0!=this.p.subtract(BigInteger.ONE).gcd(i).compareTo(BigInteger.ONE)||!this.p.isProbablePrime(10););for(;this.q=new BigInteger(r,1,n),0!=this.q.subtract(BigInteger.ONE).gcd(i).compareTo(BigInteger.ONE)||!this.q.isProbablePrime(10););this.p.compareTo(this.q)<=0&&(a=this.p,this.p=this.q,this.q=a);var o=this.p.subtract(BigInteger.ONE),s=this.q.subtract(BigInteger.ONE),a=o.multiply(s);if(0==a.gcd(i).compareTo(BigInteger.ONE)&&(this.n=this.p.multiply(this.q),this.n.bitLength()==t)){this.d=i.modInverse(a),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}this.isPrivate=!0}function RSADoPrivate(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(n)<0;)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)}function RSADecrypt(t){if(t.length!=Math.ceil(this.n.bitLength()/4))throw new Error("wrong ctext length");t=parseBigInt(t,16),t=this.doPrivate(t);return null==t?null:pkcs1unpad2(t,this.n.bitLength()+7>>3)}function RSADecryptOAEP(t,e,n){if(t.length!=Math.ceil(this.n.bitLength()/4))throw new Error("wrong ctext length");t=parseBigInt(t,16),t=this.doPrivate(t);return null==t?null:oaep_unpad(t,this.n.bitLength()+7>>3,e,n)}SecureRandom.prototype.nextBytes=rng_get_bytes,RSAKey.prototype.doPublic=RSADoPublic,RSAKey.prototype.setPublic=RSASetPublic,RSAKey.prototype.encrypt=RSAEncrypt,RSAKey.prototype.encryptOAEP=RSAEncryptOAEP,RSAKey.prototype.type="RSA",RSAKey.prototype.doPrivate=RSADoPrivate,RSAKey.prototype.setPrivate=RSASetPrivate,RSAKey.prototype.setPrivateEx=RSASetPrivateEx,RSAKey.prototype.generate=RSAGenerate,RSAKey.prototype.decrypt=RSADecrypt,RSAKey.prototype.decryptOAEP=RSADecryptOAEP,void 0!==(KJUR=void 0===KJUR||!KJUR?{}:KJUR).asn1&&KJUR.asn1||(KJUR.asn1={}),KJUR.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){t=t.toString(16);return t=t.length%2==1?"0"+t:t},this.bigIntToMinTwosComplementsHex=function(t){if("-"!=(i=t.toString(16)).substr(0,1))i.length%2==1?i="0"+i:i.match(/^[0-7]/)||(i="00"+i);else{var e=i.substr(1).length;e%2==1?e+=1:i.match(/^[0-7]/)||(e+=2);for(var n="",r=0;r =e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,n,r,i,o){o=new Date(Date.UTC(t,e-1,n,r,i,o,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},YAHOO.lang.extend(KJUR.asn1.DERAbstractTime,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractStructured=function(t){KJUR.asn1.DERAbstractString.superclass.constructor.call(this);this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},YAHOO.lang.extend(KJUR.asn1.DERAbstractStructured,KJUR.asn1.ASN1Object),KJUR.asn1.DERBoolean=function(t){KJUR.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV=0==t?"010100":"0101ff"},YAHOO.lang.extend(KJUR.asn1.DERBoolean,KJUR.asn1.ASN1Object),KJUR.asn1.DERInteger=function(t){KJUR.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){t=new BigInteger(String(t),10);this.setByBigInteger(t)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},YAHOO.lang.extend(KJUR.asn1.DERInteger,KJUR.asn1.ASN1Object),KJUR.asn1.DERBitString=function(t){var e;void 0!==t&&void 0!==t.obj&&(e=KJUR.asn1.ASN1Util.newObject(t.obj),t.hex="00"+e.getEncodedHex()),KJUR.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7 i.length&&(i=r[n]);return(t=t.replace(i,"::")).slice(1,-1)}function hextoip(t){var e="malformed hex value";if(!t.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))throw e;if(8!=t.length)return 32==t.length?hextoipv6(t):t;try{return parseInt(t.substr(0,2),16)+"."+parseInt(t.substr(2,2),16)+"."+parseInt(t.substr(4,2),16)+"."+parseInt(t.substr(6,2),16)}catch(t){throw e}}function iptohex(t){var e="malformed IP address";if(!(t=t.toLowerCase(t)).match(/^[0-9.]+$/)){if(t.match(/^[0-9a-f:]+$/)&&-1!==t.indexOf(":"))return ipv6tohex(t);throw e}var n=t.split(".");if(4!==n.length)throw e;var r="";try{for(var i=0;i<4;i++)r+=("0"+parseInt(n[i]).toString(16)).slice(-2);return r}catch(t){throw e}}function ucs2hextoutf8(t){return t.match(/.{4}/g).map(function(t){var e=parseInt(t.substr(0,2),16),t=parseInt(t.substr(2),16);if(0==e&t<128)return String.fromCharCode(t);if(e<8){var n=128|63&t;return hextoutf8((192|(7&e)<<3|(192&t)>>6).toString(16)+n.toString(16))}return n=128|(15&e)<<2|(192&t)>>6,t=128|63&t,hextoutf8((224|(240&e)>>4).toString(16)+n.toString(16)+t.toString(16))}).join("")}function encodeURIComponentAll(t){for(var e=encodeURIComponent(t),n="",r=0;r =(e=o.getChildIdx(t,e)).length?-1:o.getIdxbyList(t,e[i],n,r)},ASN1HEX.getIdxbyListEx=function(t,e,n,r){var i=ASN1HEX;if(0==n.length)return void 0!==r&&t.substr(e,2)!==r?-1:e;for(var o=n.shift(),s=i.getChildIdx(t,e),a=0,l=0;l =t.length?null:i.getTLV(t,r)},ASN1HEX.getTLVbyListEx=function(t,e,n,r){var i=ASN1HEX,r=i.getIdxbyListEx(t,e,n,r);return-1==r?null:i.getTLV(t,r)},ASN1HEX.getVbyList=function(t,e,n,r,i){var o=ASN1HEX,r=o.getIdxbyList(t,e,n,r);return-1==r||r>=t.length?null:(r=o.getV(t,r),!0===i?r.substr(2):r)},ASN1HEX.getVbyListEx=function(t,e,n,r,i){var o=ASN1HEX,r=o.getIdxbyListEx(t,e,n,r);return-1==r?null:(o=o.getV(t,r),"03"==t.substr(r,2)&&!1!==i?o.substr(2):o)},ASN1HEX.getInt=function(t,e,n){null==n&&(n=-1);try{var r=t.substr(e,2);if("02"!=r&&"03"!=r)return n;var i=ASN1HEX.getV(t,e);return"02"==r?parseInt(i,16):bitstrtoint(i)}catch(t){return n}},ASN1HEX.getOID=function(t,e,n){null==n&&(n=null);try{return"06"!=t.substr(e,2)?n:hextooid(ASN1HEX.getV(t,e))}catch(t){return n}},ASN1HEX.getOIDName=function(t,e,n){null==n&&(n=null);try{var r=ASN1HEX.getOID(t,e,n);if(r==n)return n;var i=KJUR.asn1.x509.OID.oid2name(r);return""==i?r:i}catch(t){return n}},ASN1HEX.getString=function(t,e,n){null==n&&(n=null);try{return hextorstr(ASN1HEX.getV(t,e))}catch(t){return n}},ASN1HEX.hextooidstr=function(t){function e(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t}var n=[],r=t.substr(0,2),r=parseInt(r,16);n[0]=new String(Math.floor(r/40)),n[1]=new String(r%40);for(var i=t.substr(2),o=[],s=0;s 2*i)throw new Error("L of TLV too long: idx="+e);var s=o.getVblen(t,e);if(r e.length&&(n=e.length);for(var r=0;r=e?t:new Array(e-t.length+1).join(n)+t};function bitstrtoint(t){try{var e=t.substr(0,2);if("00"==e)return parseInt(t.substr(2),16);var n=parseInt(e,16),r=t.substr(2),i=(i="0"==(i=parseInt(r,16).toString(2))?"00000000":i).slice(0,0-n);return parseInt(i,2)}catch(t){return-1}}function inttobitstr(t){var e=Number(t).toString(2),t=8-e.length%8;e+=strpad("",t=8==t?0:t,"0");e=parseInt(e,2).toString(16);return"0"+t+(e=e.length%2==1?"0"+e:e)}void 0!==(KJUR=void 0===KJUR||!KJUR?{}:KJUR).crypto&&KJUR.crypto||(KJUR.crypto={}),KJUR.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHAwithRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:CryptoJS.algo.MD5,sha1:CryptoJS.algo.SHA1,sha224:CryptoJS.algo.SHA224,sha256:CryptoJS.algo.SHA256,sha384:CryptoJS.algo.SHA384,sha512:CryptoJS.algo.SHA512,ripemd160:CryptoJS.algo.RIPEMD160},this.getDigestInfoHex=function(t,e){if(void 0===this.DIGESTINFOHEAD[e])throw"alg not supported in Util.DIGESTINFOHEAD: "+e;return this.DIGESTINFOHEAD[e]+t},this.getPaddedDigestInfoHex=function(t,e,n){var r=this.getDigestInfoHex(t,e),t=n/4;if(r.length+22>t)throw"key is too short for SigAlg: keylen="+n+","+e;for(var r="00"+r,i="",o=t-"0001".length-r.length,s=0;s >24,(16711680&i)>>16,(65280&i)>>8,255&i])))),i+=1;return r}function _rsasign_getDecryptSignatureBI(t,e,n){var r=new RSAKey;return r.setPublic(e,n),r.doPublic(t)}function _rsasign_getHexDigestInfoFromSig(t,e,n){return _rsasign_getDecryptSignatureBI(t,e,n).toString(16).replace(/^1f+00/,"")}function _rsasign_getAlgNameAndHashFromHexDisgestInfo(t){for(var e in KJUR.crypto.Util.DIGESTINFOHEAD){var n=KJUR.crypto.Util.DIGESTINFOHEAD[e],r=n.length;if(t.substring(0,r)==n)return[e,t.substring(r)]}return[]}RSAKey.prototype.sign=function(t,e){var n,t=(n=t,KJUR.crypto.Util.hashString(n,e));return this.signWithMessageHash(t,e)},RSAKey.prototype.signWithMessageHash=function(t,e){e=parseBigInt(KJUR.crypto.Util.getPaddedDigestInfoHex(t,e,this.n.bitLength()),16);return _zeroPaddingOfSignature(this.doPrivate(e).toString(16),this.n.bitLength())},RSAKey.prototype.signPSS=function(t,e,n){var r,t=(r=rstrtohex(t),KJUR.crypto.Util.hashHex(r,e));return this.signWithMessageHashPSS(t,e,n=void 0===n?-1:n)},RSAKey.prototype.signWithMessageHashPSS=function(t,e,n){function r(t){return KJUR.crypto.Util.hashHex(t,e)}var i=hextorstr(t),o=i.length,s=this.n.bitLength()-1,a=Math.ceil(s/8);if(-1===n||void 0===n)n=o;else if(-2===n)n=a-o-2;else if(n<-2)throw new Error("invalid salt length");if(a >8*a-s&255),c=0;c e)return!1;n=this.doPublic(n).toString(16);if(n.length+3!=e/4)return!1;n=_rsasign_getAlgNameAndHashFromHexDisgestInfo(n.replace(/^1f+00/,""));if(0==n.length)return!1;var r,i=n[0];return n[1]==(r=t,KJUR.crypto.Util.hashString(r,i))},RSAKey.prototype.verifyWithMessageHash=function(t,e){if(e.length!=Math.ceil(this.n.bitLength()/4))return!1;e=parseBigInt(e,16);if(e.bitLength()>this.n.bitLength())return 0;e=_rsasign_getAlgNameAndHashFromHexDisgestInfo(this.doPublic(e).toString(16).replace(/^1f+00/,""));if(0==e.length)return!1;e[0];return e[1]==t},RSAKey.prototype.verifyPSS=function(t,e,n,r){var i,t=(i=rstrtohex(t),KJUR.crypto.Util.hashHex(i,n));return this.verifyWithMessageHashPSS(t,e,n,r=void 0===r?-1:r)},RSAKey.prototype.verifyWithMessageHashPSS=function(t,e,n,r){if(e.length!=Math.ceil(this.n.bitLength()/4))return!1;function i(t){return KJUR.crypto.Util.hashHex(t,n)}var o=new BigInteger(e,16),s=hextorstr(t),e=s.length,t=this.n.bitLength()-1,a=Math.ceil(t/8);if(-1===r||void 0===r)r=e;else if(-2===r)r=a-e-2;else if(r<-2)throw new Error("invalid salt length");if(a >8*a-t&255;if(0!=(c.charCodeAt(0)&t))throw new Error("bits beyond keysize not zero");var h=pss_mgf1_str(o,c.length,i),f=[];for(u=0;u t[0].length)||(t=e,n=o,this.options.flex));o++);return t?((r=t[0].match(/\n.*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,i[n],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r||void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)},options:{},performAction:function(t,e,n,r){switch(n){case 0:break;case 1:return 6;case 2:return e.yytext=e.yytext.substr(1,e.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return e.lexer=t,e}();return void 0!==e&&(e.parser=t,e.parse=function(){return t.parse.apply(t,arguments)},!(e.main=function(t){if(!t[1])throw new Error("Usage: "+t[0]+" FILE");return t="undefined"!=typeof process?(!0)("fs").readFileSync((!0)("path").join(process.cwd(),t[1]),"utf8"):(!0)("file").path((!0)("file").cwd()).join(t[1]).read({charset:"utf-8"}),e.parser.parse(t)})===(!0).main&&e.main("undefined"!=typeof process?process.argv.slice(1):(!0)("system").args)),e}();!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).CodeMirror=e()}(this,function(){"use strict";var t=navigator.userAgent,e=navigator.platform,f=/gecko\/\d/i.test(t),n=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),i=/Edge\/(\d+)/.exec(t),b=n||r||i,v=b&&(n?document.documentMode||6:+(i||r)[1]),d=!i&&/WebKit\//.test(t),r=d&&/Qt\/\d+\.\d+/.test(t),o=!i&&/Chrome\//.test(t),p=/Opera\//.test(t),c=/Apple Computer/.test(navigator.vendor),s=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),u=/PhantomJS/.test(t),a=c&&(/Mobile\/\w+/.test(t)||2 e)return i;o.to==e&&(o.from!=o.to&&"before"==n?r=i:ot=i),o.from==e&&(o.from!=o.to&&"before"!=n?r=i:ot=i)}return null!=r?r:ot}var at,lt,ut,ct,ht,ft,dt,pt=(at="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",lt="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",ut=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ct=/[stwN]/,ht=/[LRr]/,ft=/[Lb1n]/,dt=/[1n]/,function(t,e){var n="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!ut.test(t))return!1;for(var r,i=t.length,o=[],s=0;s=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(e =t.first&&e n?re(n,Xt(t,n).text.length):(t=Xt(t,(n=e).line).text.length,null==(e=n.ch)||t =this.string.length},Gt.prototype.sol=function(){return this.pos==this.lineStart},Gt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Gt.prototype.next=function(){if(this.pos e},Gt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Gt.prototype.skipToEnd=function(){this.pos=this.string.length},Gt.prototype.skipTo=function(t){t=this.string.indexOf(t,this.pos);if(-1 t.options.maxHighlightLength&&Jt(t.doc.mode,r.state),o=pe(t,e,r),i&&(r.state=i),e.stateAfter=r.save(!i),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))),e.styles}function me(n,r,t){var e=n.doc,i=n.display;if(!e.mode.startState)return new de(e,!0,r);var o=function(t,e,n){for(var r,i,o=t.doc,s=n?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;se.first&&Xt(e,o-1).stateAfter,a=s?de.fromSaved(e,s,o):new de(e,qt(e.mode),o);return e.iter(o,r,function(t){ve(n,t.text,a);var e=a.line;t.stateAfter=e==r-1||e%5==0||e>=i.viewFrom&&e e.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}de.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},de.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},de.prototype.nextLine=function(){this.line++,0 t.options.maxHighlightLength?(a=!1,s&&ve(t,e,r,c.pos),c.pos=e.length,null):Se(xe(n,c,r.state,h),o);if(!h||(f=h[0].name)&&(d="m-"+(d?f+" "+d:f)),!a||u!=d){for(;l =e:s.to>e),(r=r||[]).push(new ke(a,s.from,o?null:s.to)))}return r}(n,i,t),a=function(t,e,n){var r;if(t)for(var i=0;i =e:s.to>e))&&(s.from!=e||"bookmark"!=a.type||n&&!s.marker.insertLeft)||(o=null==s.from||(a.inclusiveLeft?s.from<=e:s.from t.lastLine())return e;var n,r=Xt(t,e);if(!Fe(t,r))return e;for(;n=Pe(r);)r=n.find(1,!0).line;return Qt(r)+1}function Fe(t,e){var n=Te&&e.markedSpans;if(n)for(var r,i=0;i n.maxLineLength&&(n.maxLineLength=e,n.maxLine=t)})}var We=function(t,e,n){this.text=t,Le(this,e),this.height=n?n(this):1};We.prototype.lineNo=function(){return Qt(this)},Tt(We);var qe={},Ge={};function Xe(t,e){if(!t||/^\s*$/.test(t))return null;e=e.addModeClass?Ge:qe;return e[t]||(e[t]=t.replace(/\S+/g,"cm-$&"))}function $e(t,e){var n=k("span",null,null,d?"padding-right: .1px":null),r={pre:k("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var o=i?e.rest[i-1]:e.line,s=void 0;r.pos=0,r.addToken=Ze,function(t){if(null!=Dt)return Dt;var e=T(t,document.createTextNode("AخA")),n=I(e,0,1).getBoundingClientRect(),e=I(e,1,2).getBoundingClientRect();return A(t),n&&n.left!=n.right&&(Dt=e.right-n.right<3)}(t.display.measure)&&(s=mt(o,t.doc.direction))&&(r.addToken=function(h,f){return function(t,e,n,r,i,o,s){n=n?n+" cm-force-border":"cm-force-border";for(var a=t.pos,l=a+e.length;;){for(var u=void 0,c=0;c a&&u.from<=a);c++);if(u.to>=l)return h(t,e,n,r,i,o,s);h(t,e.slice(0,u.to-a),n,r,null,o,s),r=null,e=e.slice(u.to-a),a=u.to}}}(r.addToken,s)),r.map=[],function(t,e,n){var r=t.markedSpans,i=t.text,o=0;if(r)for(var s,a,l,u,c,h,f,d=i.length,p=0,g=1,m="",v=0;;){if(v==p){l=u=c=a="",h=f=null,v=1/0;for(var y=[],x=void 0,b=0;b p||S.collapsed&&w.to==p&&w.from==p)){if(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,u=""),S.className&&(l+=" "+S.className),S.css&&(a=(a?a+";":"")+S.css),S.startStyle&&w.from==p&&(c+=" "+S.startStyle),S.endStyle&&w.to==v&&(x=x||[]).push(S.endStyle,w.to),S.title&&((f=f||{}).title=S.title),S.attributes)for(var C in S.attributes)(f=f||{})[C]=S.attributes[C];S.collapsed&&(!h||Be(h.marker,S)<0)&&(h=w)}else w.from>p&&v>w.from&&(v=w.from)}if(x)for(var A=0;A n)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function An(t,e,n,r){return Rn(t,kn(t,e),n,r)}function Tn(t,e){if(e>=t.display.viewFrom&&e =t.lineN&&e e)&&(i=(o=l-a)-1,l<=e&&(s="right")),null!=i){if(r=t[u+2],a==l&&n==(r.insertLeft?"left":"right")&&(s=n),"left"==n&&0==i)for(;u&&t[u-2]==t[u-3]&&t[u-1].insertLeft;)r=t[2+(u-=3)],s="left";if("right"==n&&i==l-a)for(;u =i.text.length?(e=i.text.length,u="before"):e<=0&&(e=0,u="after"),!l)return a("before"==u?e-1:e,"before"==u);function c(t,e,n){return a(n?t-1:t,1==l[e].level!=n)}var h=st(l,e,u),t=ot,h=c(e,h,"before"==u);return null!=t&&(h.other=c(e,t,"before"!=u)),h}function jn(t,e){var n=0;e=ce(t.doc,e),t.options.lineWrapping||(n=Gn(t.display)*e.ch);e=Xt(t.doc,e.line),t=ze(e)+vn(t.display);return{left:n,right:n,top:t,bottom:t+e.height}}function Fn(t,e,n,r,i){n=re(t,e,n);return n.xRel=i,r&&(n.outside=r),n}function zn(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return Fn(r.first,0,null,-1,-1);var i=te(r,n),o=r.first+r.size-1;if(o=l||d.to<=a||(f=1!=d.level,f=Rn(t,r,f?Math.min(l,d.to)-1:Math.max(a,d.from)).right,f=f l&&(u={from:u.from,to:l,level:u.level});return u}:function(n,r,i,o,s,a,l){var t=it(function(t){var e=s[t],t=1!=e.level;return Wn(Kn(n,re(i,t?e.to:e.from,t?"before":"after"),"line",r,o),a,l,!0)},0,s.length-1),e=s[t];{var u;0 l&&(e=s[t-1]))}return e})(n,t,e,o,c,r,i),u=1!=d.level,a=u?d.from:d.to-1,l=u?d.to:d.from-1);var h=null,f=null,c=it(function(t){var e=Rn(n,o,t);return e.top+=s,e.bottom+=s,Wn(e,r,i,!1)&&(e.top<=i&&e.left<=r&&(h=t,f=e),1)},a,l),d=!1;{var p,g;f?(p=r-f.left =u.bottom?1:0)}return c=rt(t.text,c,1),Fn(e,c,g,d,r-p)}(t,s,i,e,n),l=function(t,e){var n,r=Te&&t.markedSpans;if(r)for(var i=0;i e)&&(!n||Be(n,o.marker)<0)&&(n=o.marker)}return n}(s,a.ch+(0 r},t,i)}}function Jn(t,e,n,r){return Vn(t,e,n=n||kn(t,e),Pn(t,e,Rn(t,n,r),"line").top)}function Wn(t,e,n,r){return!(t.bottom<=n)&&(t.top>n||(r?t.left:t.right)>e)}function qn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Mn){Mn=R("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Mn.appendChild(document.createTextNode("x")),Mn.appendChild(R("br"));Mn.appendChild(document.createTextNode("x"))}T(t.measure,Mn);var n=Mn.offsetHeight/50;return 3 =t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;r e)&&(s.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=s.viewTo?Te&&Ke(t.doc,e) s.viewFrom?rr(t):(s.viewFrom+=r,s.viewTo+=r):e<=s.viewFrom&&n>=s.viewTo?rr(t):e<=s.viewFrom?(i=ir(t,n,n+r,1))?(s.view=s.view.slice(i.index),s.viewFrom=i.lineN,s.viewTo+=r):rr(t):n>=s.viewTo?(o=ir(t,e,e,-1))?(s.view=s.view.slice(0,o.index),s.viewTo=o.lineN):rr(t):(i=ir(t,e,e,-1),o=ir(t,n,n+r,1),i&&o?(s.view=s.view.slice(0,i.index).concat(en(t,i.lineN,o.lineN)).concat(s.view.slice(o.index)),s.viewTo+=r):rr(t));t=s.externalMeasured;t&&(n =i.lineN&&e =r.viewTo||(null==(e=r.view[tr(t,e)]).node||-1==U(e=e.changes||(e.changes=[]),n)&&e.push(n))}function rr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function ir(t,e,n,r){var i,o=tr(t,e),s=t.display.view;if(!Te||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var a=t.display.viewFrom,l=0;l =t.display.viewTo||n.to().line e||e==n&&s.to==e)&&(r(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr",o),i=!0)}i||r(e,n,"ltr")}(S,g||0,null==m?x:m,function(t,e,n,r){var i,o,s,a,l="ltr"==n,u=b(t,l?"left":"right"),c=b(e-1,l?"right":"left"),h=null==g&&0==t,f=null==m&&e==x,d=0==r,p=!S||r==S.length-1;c.top-u.top<=3?(i=(T?h:f)&&d?C:(l?u:c).left,r=(T?f:h)&&p?A:(l?c:u).right,k(i,u.top,r-i,u.bottom)):(n=l?(o=T&&h&&d?C:u.left,s=T?A:w(t,n,"before"),a=T?C:w(e,n,"after"),T&&f&&p?A:c.right):(o=T?w(t,n,"before"):C,s=!T&&h&&d?A:u.right,a=!T&&f&&p?C:c.left,T?w(e,n,"after"):A),k(o,u.top,s-o,u.bottom),u.bottom t.display.sizerWidth&&((l=Math.ceil(l/Gn(t.display)))>t.display.maxLineLength&&(t.display.maxLineLength=l,t.display.maxLine=o.line,t.display.maxLineChanged=!0))}}}function mr(t){if(t.widgets)for(var e=0;e =r&&(o=te(e,ze(Xt(e,n))-t.wrapper.clientHeight),r=n)),{from:o,to:Math.max(r,o+1)}}function yr(t,e){var n=t.display,r=qn(t.display);e.top<0&&(e.top=0);var i=(t.curOp&&null!=t.curOp.scrollTop?t.curOp:n.scroller).scrollTop,o=Sn(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+yn(n),l=e.top a-r;e.topi+o&&((u=Math.min(e.top,(r?a:e.bottom)-o))!=i&&(s.scrollTop=u));var i=t.options.fixedGutter?0:n.gutters.offsetWidth,u=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-i,t=wn(t)-n.gutters.offsetWidth,n=e.right-e.left>t;return n&&(e.right=e.left+t),e.left<10?s.scrollLeft=0:e.leftt+u-3&&(s.scrollLeft=e.right+(n?0:10)-t),s}function xr(t,e){null!=e&&(Sr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc:t.curOp).scrollTop+e)}function br(t){Sr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function wr(t,e,n){null==e&&null==n||Sr(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Sr(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Cr(t,jn(t,e.from),jn(t,e.to),e.margin))}function Cr(t,e,n,r){r=yr(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-r,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+r});wr(t,r.scrollLeft,r.scrollTop)}function Ar(t,e){Math.abs(t.doc.scrollTop-e)<2||(f||Vr(t,{top:e}),Tr(t,e,!0),f&&Vr(t),_r(t,100))}function Tr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),t.display.scroller.scrollTop==e&&!n||(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function kr(t,e,n,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,qr(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Rr(t){var e=t.display,n=e.gutters.offsetWidth,r=Math.round(t.doc.height+yn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+bn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}t=function(t,e,n){this.cm=n;var r=this.vert=R("div",[R("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=R("div",[R("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,t(r),t(i),yt(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),yt(i,"scroll",function(){i.clientWidth&&e(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&v<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};t.prototype.update=function(t){var e,n=t.scrollWidth>t.clientWidth+1,r=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;return r?(this.vert.style.display="block",this.vert.style.bottom=n?i+"px":"0",e=t.viewHeight-(n?i:0),this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+e)+"px"):(this.vert.style.display="",this.vert.firstChild.style.height="0"),n?(this.horiz.style.display="block",this.horiz.style.right=r?i+"px":"0",this.horiz.style.left=t.barLeft+"px",e=t.viewWidth-t.barLeft-(r?i:0),this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+e)+"px"):(this.horiz.style.display="",this.horiz.firstChild.style.width="0"),!this.checkedZeroWidth&&0 =n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new jr(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}(e[n]);for(var r=0;r (window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null==i||u||(e=R("div","",null,"position: absolute;\n top: "+(e.top-n.viewOffset-vn(t.display))+"px;\n height: "+(e.bottom-e.top+bn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;"),t.display.lineSpace.appendChild(e),e.scrollIntoView(i),t.display.lineSpace.removeChild(e)))}(e,i))}var o=t.maybeHiddenMarkers,s=t.maybeUnhiddenMarkers;if(o)for(var a=0;a =s.display.viewTo||(a=+new Date+s.options.workTime,l=me(s,c.highlightFrontier),u=[],c.iter(l.line,Math.min(c.first+c.size,s.display.viewTo+500),function(t){if(l.line>=s.display.viewFrom){var e=t.styles,n=t.text.length>s.options.maxHighlightLength?Jt(c.mode,l.state):null,r=pe(s,t,l,!0);n&&(l.state=n),t.styles=r.styles;n=t.styleClasses,r=r.classes;r?t.styleClasses=r:n&&(t.styleClasses=null);for(var i=!e||e.length!=t.styles.length||n!=r&&(!n||!r||n.bgClass!=r.bgClass||n.textClass!=r.textClass),o=0;!i&&o a)return _r(s,s.options.workDelay),!0}),c.highlightFrontier=l.line,c.modeFrontier=Math.max(c.modeFrontier,l.line),u.length&&Or(s,function(){for(var t=0;t =n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==or(t))return!1;Gr(t)&&(rr(t),e.dims=Xn(t));var i=r.first+r.size,o=Math.max(e.visible.from-t.options.viewportMargin,r.first),s=Math.min(i,e.visible.to+t.options.viewportMargin);n.viewFrom s&&n.viewTo-s<20&&(s=Math.min(i,n.viewTo)),Te&&(o=Ke(t.doc,o),s=je(t.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;r=o,i=s,0==(s=(o=t).display).view.length||r>=s.viewTo||i<=s.viewFrom?(s.view=en(o,r,i),s.viewFrom=r):(s.viewFrom>r?s.view=en(o,r,s.viewFrom).concat(s.view):s.viewFrom i&&(s.view=s.view.slice(0,tr(o,i)))),s.viewTo=i,n.viewOffset=ze(Xt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";o=or(t);if(!a&&0==o&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;s=function(t){if(t.hasFocus())return null;var e=E();if(!e||!M(t.display.lineDiv,e))return null;var n={activeElt:e};return!window.getSelection||(e=window.getSelection()).anchorNode&&e.extend&&M(t.display.lineDiv,e.anchorNode)&&(n.anchorNode=e.anchorNode,n.anchorOffset=e.anchorOffset,n.focusNode=e.focusNode,n.focusOffset=e.focusOffset),n}(t);return 4 =t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!Fr(t,e))break;gr(t);var i=Rr(t);sr(t),Mr(t,i),Wr(t,i),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Vr(t,e){var n=new jr(t,e);Fr(t,n)&&(gr(t),zr(t,n),e=Rr(t),sr(t),Mr(t,e),Wr(t,e),n.finish())}function Jr(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function Wr(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+bn(t)+"px"}function qr(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=$n(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=r+"px",s=0;s s.clientWidth,l=s.scrollHeight>s.clientHeight;if(r&&a||i&&l){if(i&&g&&d)t:for(var u=e.target,c=o.view;u!=s;u=u.parentNode)for(var h=0;h a-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=(l=i).lastOp==r?(wi(l.done),q(l.done)):l.done.length&&!q(l.done).ranges?q(l.done):1 i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,s||wt(t,"historyAdded")}function Ci(t,e,n,r){var i,o,s,a=t.history,l=r&&r.origin;n==a.lastSelOp||l&&a.lastSelOrigin==l&&(a.lastModTime==a.lastSelTime&&a.lastOrigin==l||(i=t,o=l,s=q(a.done),t=e,"*"==(o=o.charAt(0))||"+"==o&&s.ranges.length==t.ranges.length&&s.somethingSelected()==t.somethingSelected()&&new Date-i.history.lastSelTime<=(i.cm?i.cm.options.historyEventDelay:500)))?a.done[a.done.length-1]=e:Ai(e,a.done),a.lastSelTime=+new Date,a.lastSelOrigin=l,a.lastSelOp=n,r&&!1!==r.clearRedo&&wi(a.undone)}function Ai(t,e){var n=q(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Ti(e,n,t,r){var i=n["spans_"+e.id],o=0;e.iter(Math.max(e.first,t),Math.min(e.first+e.size,r),function(t){t.markedSpans&&((i=i||(n["spans_"+e.id]={}))[o]=t.markedSpans),++o})}function ki(t,e){var n=e["spans_"+t.id];if(!n)return null;for(var r=[],i=0;i =e.ch:a.to>e.ch))){if(i&&(wt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(l.atomic){if(n){var h=l.find(r<0?1:-1),a=void 0;if((h=(r<0?c:u)?Fi(t,h,-r,h&&h.line==e.line?o:null):h)&&h.line==e.line&&(a=ie(h,n))&&(r<0?a<0:0t.first?ce(t,re(e.line-1)):null:0 t.lastLine()||(e.from.line i?{from:e.from,to:re(i,Xt(t,i).text.length),text:[e.text[0]],origin:e.origin}:e).removed=$t(t,e.from,e.to),n=n||ci(t,e),t.cm?function(t,e,n){var r=t.doc,i=t.display,o=e.from,s=e.to,a=!1,l=o.line;t.options.lineWrapping||(l=Qt(_e(Xt(r,o.line))),r.iter(l,s.line+1,function(t){if(t==i.maxLine)return a=!0}));-1 i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0));(function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&er(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ui(e.doc)),e&&sn(e,"markerCleared",e,this,r,i),n&&Br(e),this.parent&&this.parent.clear()}},so.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i